From 038998c8574567621b59f047f1f67743793ecc9b Mon Sep 17 00:00:00 2001 From: qianlongxu Date: Wed, 14 Dec 2022 18:44:27 +0800 Subject: [PATCH] update version rule. --- .github/workflows/publish-github-release.yml | 5 +++-- .github/workflows/publish-ijk-release.yml | 5 +++-- download-pre.sh | 7 +++++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-github-release.yml b/.github/workflows/publish-github-release.yml index e05be6d..ad131b8 100644 --- a/.github/workflows/publish-github-release.yml +++ b/.github/workflows/publish-github-release.yml @@ -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 diff --git a/.github/workflows/publish-ijk-release.yml b/.github/workflows/publish-ijk-release.yml index 5f649b0..2eb8f4a 100644 --- a/.github/workflows/publish-ijk-release.yml +++ b/.github/workflows/publish-ijk-release.yml @@ -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 diff --git a/download-pre.sh b/download-pre.sh index de05e00..d83d7e0 100755 --- a/download-pre.sh +++ b/download-pre.sh @@ -15,6 +15,8 @@ # limitations under the License. # +VERSION=20221214184236 + set -e EDITION=$1 @@ -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