Attempt to inject git info for docker builds
This commit is contained in:
parent
7ead58bb52
commit
593bb4a235
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "SOURCE_COMMIT: $SOURCE_COMMIT"
|
||||
|
||||
if [[ -z "$SOURCE_COMMIT" ]]; then
|
||||
export SOURCE_COMMIT="${SOURCE_COMMIT:-$(git rev-parse HEAD)}"
|
||||
echo "Updating SOURCE_COMMIT from git rev-parse HEAD"
|
||||
echo "SOURCE_COMMIT: $SOURCE_COMMIT"
|
||||
fi
|
||||
|
||||
echo "DOCKER_TAG: $DOCKER_TAG"
|
||||
|
||||
docker build --build-arg "SOURCE_COMMIT=$SOURCE_COMMIT" -f $DOCKERFILE_PATH -t $IMAGE_NAME .
|
|
@ -546,7 +546,6 @@ export default {
|
|||
|
||||
if (this.GET_ROOM) {
|
||||
await this.joinRoom()
|
||||
.catch(() => {});
|
||||
}
|
||||
} catch (e) {
|
||||
this.serverError = `Failed to connect to ${this.selectedServer.url}`;
|
||||
|
|
|
@ -16,7 +16,6 @@ try {
|
|||
// Sometimes on CI stuff they build with .git being present
|
||||
// TODO: find better way to do this
|
||||
process.env.VUE_APP_GIT_DATE = new Date().toISOString();
|
||||
console.log('env', process.env);
|
||||
|
||||
if (process.env.SOURCE_COMMIT) {
|
||||
process.env.VUE_APP_GIT_HASH = process.env.SOURCE_COMMIT.substring(0, 7);
|
||||
|
@ -27,6 +26,8 @@ try {
|
|||
}
|
||||
}
|
||||
|
||||
console.log('env', process.env);
|
||||
|
||||
module.exports = {
|
||||
lintOnSave: process.env.NODE_ENV !== 'production',
|
||||
productionSourceMap: false,
|
||||
|
|
Loading…
Reference in New Issue