mirror of
https://github.com/mempool/mempool.git
synced 2025-01-19 05:34:03 +01:00
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
19bb8988f8
commit
34c8ad614a
@ -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) {
|
||||
|
@ -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 . .
|
||||
|
Loading…
Reference in New Issue
Block a user