From b38d209f8c5c8f5e8bbc3542e8db46ea220829fd Mon Sep 17 00:00:00 2001 From: Samuel Alfageme Sainz Date: Tue, 19 Jan 2021 17:36:28 +0100 Subject: [PATCH] Add the .git dir back into the revad image - So we can pass the version & git sha on the build process. - Also return 0 on 'revad -version' --- .dockerignore | 1 - changelog/unreleased/fix-version-string.md | 4 ++++ cmd/revad/main.go | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 changelog/unreleased/fix-version-string.md diff --git a/.dockerignore b/.dockerignore index dedb85173a..429a7e9d46 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,4 @@ .github -.git changelog docs examples diff --git a/changelog/unreleased/fix-version-string.md b/changelog/unreleased/fix-version-string.md new file mode 100644 index 0000000000..7b066337a6 --- /dev/null +++ b/changelog/unreleased/fix-version-string.md @@ -0,0 +1,4 @@ +Bugfix: re-include the '.git' dir in the Docker images to pass the version tag +and git SHA to the release tool. + +https://github.com/cs3org/reva/pull/1413 diff --git a/cmd/revad/main.go b/cmd/revad/main.go index be3addcbe6..219c0c4690 100644 --- a/cmd/revad/main.go +++ b/cmd/revad/main.go @@ -86,7 +86,7 @@ func main() { func handleVersionFlag() { if *versionFlag { fmt.Fprintf(os.Stderr, "%s\n", getVersionString()) - os.Exit(1) + os.Exit(0) } }