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:
parent
74f90c73d8
commit
4d138bcc97
@ -8,8 +8,8 @@ function getVersion(): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getGitCommit(): string {
|
function getGitCommit(): string {
|
||||||
if (process.env.DOCKER_COMMIT_HASH) {
|
if (process.env.MEMPOOL_COMMIT_HASH) {
|
||||||
return process.env.DOCKER_COMMIT_HASH;
|
return process.env.MEMPOOL_COMMIT_HASH;
|
||||||
} else {
|
} else {
|
||||||
const gitRevParse = spawnSync('git', ['rev-parse', '--short', 'HEAD']);
|
const gitRevParse = spawnSync('git', ['rev-parse', '--short', 'HEAD']);
|
||||||
if (!gitRevParse.error) {
|
if (!gitRevParse.error) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM node:16.16.0-buster-slim AS builder
|
FROM node:16.16.0-buster-slim AS builder
|
||||||
|
|
||||||
ARG commitHash
|
ARG commitHash
|
||||||
ENV DOCKER_COMMIT_HASH=${commitHash}
|
ENV MEMPOOL_COMMIT_HASH=${commitHash}
|
||||||
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
COPY . .
|
COPY . .
|
||||||
|
Loading…
x
Reference in New Issue
Block a user