Skip to content

Commit

Permalink
Make versions number work for auto upgrade in LMS
Browse files Browse the repository at this point in the history
  • Loading branch information
danielvijge committed Aug 10, 2020
1 parent 01b8137 commit 1fc1def
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
- name: Set version number (release build)
if: contains(github.ref, 'refs/tags/')
run: |
echo "::set-env name=VERSION::`echo ${GITHUB_REF##*/}`"
echo "::set-env name=VERSION::`echo ${GITHUB_REF##*/}`.0"
echo "::set-env name=RELEASE_CHANNEL::release"
echo "::set-env name=FOLDER::."
- name: Set version number (development build)
if: "!contains(github.ref, 'refs/tags/')"
run: |
echo "::set-env name=VERSION::`git describe --tags`"
echo "::set-env name=VERSION::`git describe --tags --abbrev=0`.`git rev-list $(git describe --tags --abbrev=0)..HEAD --count`"
echo "::set-env name=RELEASE_CHANNEL::dev"
echo "::set-env name=FOLDER::dev-builds"
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
release_name: Release ${{ env.VERSION }}
draft: false
prerelease: false

Expand Down
2 changes: 1 addition & 1 deletion generate-zip.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
set -x

VERSION=`git describe --tags`
VERSION=`git describe --tags --abbrev=0`.`git rev-list $(git describe --tags --abbrev=0)..HEAD --count`

sed "s/{{ env\['VERSION'\] }}/$VERSION/g" install.template.xml > install.xml
zip -r lms_mixcloud-$VERSION.zip . -x \*.zip \*.sh \*.git\* \*README\* \*sublime-\* \*.DS_Store\* \*.template.xml
Expand Down

0 comments on commit 1fc1def

Please sign in to comment.