diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1a3ecb2da..12af11982 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -68,7 +68,7 @@ jobs: - name: Build inside of the docker container id: build-pack-binary run: | - docker run --rm -v ${{ github.workspace }}/api/deploy/release:/app/deploy/release builder npm run build-and-pack + docker run --rm -v ${{ github.workspace }}/api/deploy/release:/app/deploy/release -v ${{ github.workspace}}/.git:/app/.git builder npm run build-and-pack API_VERSION=$(cat package.json | jq -r '.version') echo "::set-output name=API_VERSION::${API_VERSION}" diff --git a/api/scripts/get-tags.mjs b/api/scripts/get-tags.mjs index c24d7fd03..6d31a2aa7 100644 --- a/api/scripts/get-tags.mjs +++ b/api/scripts/get-tags.mjs @@ -22,7 +22,8 @@ const getTags = (env = process.env) => { const isCommitTagged = runCommand('git describe --tags --abbrev=0 --exact-match') !== undefined; console.log('gitShortSHA', gitShortSHA, 'isCommitTagged', isCommitTagged); if (!gitShortSHA) { - throw new Error('Failing build due to missing SHA'); + console.error('Failed to get git short SHA'); + process.exit(1); } return { shortSha: gitShortSHA,