From 06cd7899ad4b03db697f9538fc55d5a4fcb398b3 Mon Sep 17 00:00:00 2001 From: Finn Date: Wed, 16 Oct 2019 21:31:23 -0700 Subject: [PATCH] Fix version tagging --- .gitlab-ci.yml | 2 +- migrate-and-start-server.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d8361f4..4055449 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,7 @@ build:signal-server: stage: build script: - docker build -f signal-server.Dockerfile -t ${CI_REGISTRY_IMAGE}/signal-server:${CI_COMMIT_SHA:0:8} . - - export VERSION=$(docker run ${CI_REGISTRY_IMAGE}/signal-server:${CI_COMMIT_SHA:0:8} -v) + - export VERSION=$(docker run ${CI_REGISTRY_IMAGE}/signal-server:${CI_COMMIT_SHA:0:8} version) - docker tag ${CI_REGISTRY_IMAGE}/signal-server:${CI_COMMIT_SHA:0:8} ${CI_REGISTRY_IMAGE}/signal-server:${CI_COMMIT_REF_SLUG} - docker tag ${CI_REGISTRY_IMAGE}/signal-server:${CI_COMMIT_SHA:0:8} ${CI_REGISTRY_IMAGE}/signal-server:${VERSION} - docker push ${CI_REGISTRY_IMAGE}/signal-server:${CI_COMMIT_SHA:0:8} diff --git a/migrate-and-start-server.sh b/migrate-and-start-server.sh index f769d27..5eae0d5 100755 --- a/migrate-and-start-server.sh +++ b/migrate-and-start-server.sh @@ -1,5 +1,9 @@ #!/bin/bash set -exu +if [[ "$1" == "version" ]]; then + java -jar /usr/share/TextSecureServer.jar -v + exit +fi java -jar /usr/share/TextSecureServer.jar abusedb migrate /etc/signal-server.yaml java -jar /usr/share/TextSecureServer.jar accountdb migrate /etc/signal-server.yaml java -jar /usr/share/TextSecureServer.jar messagedb migrate /etc/signal-server.yaml