backend: Rename build variable DOCKER_COMMIT_HASH -> MEMPOOL_COMMIT_HASH

This var is useful for all build methods, not only Docker.

This is an internal renaming that doesn't change the public Docker
backend image API.
This commit is contained in:
Erik Arvstedt 2022-07-13 12:44:35 +02:00
parent 19bb8988f8
commit 34c8ad614a
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
2 changed files with 3 additions and 3 deletions

View File

@ -8,8 +8,8 @@ function getVersion(): string {
}
function getGitCommit(): string {
if (process.env.DOCKER_COMMIT_HASH) {
return process.env.DOCKER_COMMIT_HASH;
if (process.env.MEMPOOL_COMMIT_HASH) {
return process.env.MEMPOOL_COMMIT_HASH;
} else {
const gitRevParse = spawnSync('git', ['rev-parse', '--short', 'HEAD']);
if (!gitRevParse.error) {

View File

@ -1,7 +1,7 @@
FROM node:16.16.0-buster-slim AS builder
ARG commitHash
ENV DOCKER_COMMIT_HASH=${commitHash}
ENV MEMPOOL_COMMIT_HASH=${commitHash}
WORKDIR /build
COPY . .