Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
agateau committed Mar 22, 2020
2 parents 53c9811 + bd62845 commit 5433583
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,19 @@ jobs:
- name: Run tests
run: ci/run-tests
- name: Create archive
run: ci/create-archive
shell: bash
run: |
# `git describe --always` returns a sha1 when called here, even when building a tag.
# Use https://github.community/t5/GitHub-Actions/How-to-get-just-the-tag-name/m-p/32167/highlight/true#M1027
# as a workaround when building a tag
case "$GITHUB_REF" in
refs/tags/*)
export VERSION=${GITHUB_REF/refs\/tags\//}
;;
*)
;;
esac
ci/create-archive
- name: Set archive name
shell: bash
run: |
Expand Down
9 changes: 8 additions & 1 deletion ci/create-archive
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ cd $(dirname $0)/..

APP_NAME=git-bonsai
DATA_FILES="README.md CHANGELOG.md LICENSE"
VERSION=$(git describe --always)

set +u
# Let caller define VERSION through an environment variable
if [ -z "$VERSION" ] ; then
VERSION=$(git describe --always)
fi
set -u

ARTIFACTS_DIR=$PWD/artifacts
ARCHIVE_DIR=$APP_NAME-$VERSION
ARCHIVE_NAME=$APP_NAME-$VERSION.tar.bz2
Expand Down

0 comments on commit 5433583

Please sign in to comment.