Skip to content

Commit

Permalink
Try to fix tag-based version detection in CI scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
kingjon3377 committed Jun 28, 2021
1 parent ad13725 commit b8945e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
- name: Install unpackaged dependencies
shell: bash
run: ./install-deps.sh
env:
GITHUB_REF: ${{ github.ref }}
- name: Populate Ceylon modules cache if Herd down
shell: bash
run: .github/scripts/populate-cache.sh
Expand Down
7 changes: 3 additions & 4 deletions install-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ wget -nv "https://repo.maven.apache.org/maven2/com/yuvimasory/orange-extensions/
wget -nv "https://github.com/tofi86/universalJavaApplicationStub/archive/v${APP_STUB_VERSION}.tar.gz" -O \
"universalJavaApplicationStub-${APP_STUB_VERSION}.tar.gz"
tar xzf "universalJavaApplicationStub-${APP_STUB_VERSION}.tar.gz"
if test -n "${GITHUB_REF}"; then
echo "${GITHUB_REF}" | sed 's@^refs/tags/v\([0-9]\.[0-9]\.[0-9]*\|[0-9]*\.[0-9]*\|[0-9]*[-_]rc[0-9]*\)$@s:SNAPSHOT:\1:@' | \
sed -f - -i version.properties
fi
case "${GITHUB_REF:-none}" in
refs/tags/v*) sed -i -e "s@SNAPSHOT@${GITHUB_REF#refs/tags/v}@" version.properties ;;
esac
wget -nv "https://ceylon-lang.org/download/dist/$(echo "${CEYLON_VERSION}"|sed 's@\.@_@g')" \
--output-document=ceylon.zip
unzip -q ceylon.zip
Expand Down

0 comments on commit b8945e3

Please sign in to comment.