Skip to content

Commit

Permalink
update version rule.
Browse files Browse the repository at this point in the history
  • Loading branch information
debugly committed Dec 14, 2022
1 parent 7c2eeee commit 038998c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/publish-github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ jobs:
- name: Read Tag Version
run: |
# https://stackoverflow.com/questions/4916492/git-describe-fails-with-fatal-no-names-found-cannot-describe-anything
# git describe --tags --always | awk -F . '{printf "RELEASE_VERSION=%s.%d",$1,$2+1}' | xargs echo > constants.env
git describe --tags --always | awk -F - '{printf "RELEASE_VERSION=V1.0-%s",$NF}' | xargs echo > constants.env
# git describe --tags --always | awk -F . '{printf "RELEASE_VERSION=%s.%d",$1,$2+1}' | xargs > constants.env
# git describe --tags --always | awk -F - '{printf "RELEASE_VERSION=V1.0-%s",$NF}' | xargs > constants.env
grep VERSION= download-pre.sh | awk -F = '{printf "RELEASE_VERSION=%s",$2}' | xargs > constants.env
echo 'EDITION=github' >> constants.env
cat constants.env
- name: Export Env
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/publish-ijk-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ jobs:
- name: Read Tag Version
run: |
# https://stackoverflow.com/questions/4916492/git-describe-fails-with-fatal-no-names-found-cannot-describe-anything
# git describe --tags --always | awk -F . '{printf "RELEASE_VERSION=%s.%d",$1,$2+1}' | xargs echo > constants.env
git describe --tags --always | awk -F - '{printf "RELEASE_VERSION=V1.0-%s",$NF}' | xargs echo > constants.env
# git describe --tags --always | awk -F . '{printf "RELEASE_VERSION=%s.%d",$1,$2+1}' | xargs > constants.env
# git describe --tags --always | awk -F - '{printf "RELEASE_VERSION=V1.0-%s",$NF}' | xargs > constants.env
grep VERSION= download-pre.sh | awk -F = '{printf "RELEASE_VERSION=%s",$2}' | xargs > constants.env
echo 'EDITION=ijk' >> constants.env
cat constants.env
- name: Export Env
Expand Down
7 changes: 5 additions & 2 deletions download-pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# limitations under the License.
#

VERSION=20221214184236

set -e

EDITION=$1
Expand Down Expand Up @@ -63,8 +65,9 @@ if [[ "$PLAT" != 'ios' && "$PLAT" != 'macos' && "$PLAT" != 'all' ]]; then
fi

if test -z $VER ;then
VER=$(git describe --abbrev=0 --tag | awk -F - '{printf "%s-%s",$1,$2}')
echo "auto find the latest tag:${VER}"
//VER=$(git describe --abbrev=0 --tag | awk -F - '{printf "%s-%s",$1,$2}')
VER="$VERSION"
echo "use the default version:${VER}"
fi

if [[ "$PLAT" == 'ios' || "$PLAT" == 'macos' ]]; then
Expand Down

0 comments on commit 038998c

Please sign in to comment.