From f51311ee207bcada841fe87fd17cfee0a20139fb Mon Sep 17 00:00:00 2001 From: Liuyf Date: Tue, 22 Oct 2024 09:30:20 +0800 Subject: [PATCH] =?UTF-8?q?other=EF=BC=9A=20=E6=96=B0=E5=A2=9Ecanary?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=89=93=E5=8C=85=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 2 ++ android/build.sh | 13 +++++++++---- ios/build.sh | 13 +++++++++---- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ade38dc2..e8b7601b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,6 +18,7 @@ variables: - if: $CI_COMMIT_BRANCH == "develop" - if: $CI_COMMIT_BRANCH == "release" - if: $CI_COMMIT_BRANCH =~ /feat_[a-zA-Z]+/ + - if: $CI_COMMIT_BRANCH == "canary_release" - if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z]+\.[0-9]+)?$/ .generate_tag_rule: @@ -34,6 +35,7 @@ variables: rules: - if: $CI_COMMIT_BRANCH == "develop" - if: $CI_COMMIT_BRANCH == "release" + - if: $CI_COMMIT_BRANCH == "canary_release" - if: $CI_COMMIT_BRANCH =~ /feat_[a-zA-Z]+/ .print_env: diff --git a/android/build.sh b/android/build.sh index 6d2af557..985f6e5e 100755 --- a/android/build.sh +++ b/android/build.sh @@ -9,16 +9,21 @@ echo "GITLAB_WORKSPACE: ${CI_PROJECT_DIR}" cd ${CI_PROJECT_DIR}/android echo "ENV_BUILD_TAG:${ENV_BUILD_TAG},ENV_BUILD_BRANCH:${ENV_BUILD_BRANCH}" regex='^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z]+\.[0-9]+)?$' -if [[ $ENV_BUILD_TAG =~ $regex ]]; then - echo "===Building xhj release===" +if [[ "${ENV_BUILD_BRANCH}" == "canary_release"]]; then + echo "===build canary_release: ${NEXT_VERSION}" + export ENV_BUILD_TAG=${NEXT_VERSION} + bundle exec fastlane release flavor:xhj --verbose + bundle exec fastlane release flavor:sky --verbose +elif [[ $ENV_BUILD_TAG =~ $regex ]]; then + echo "===build release===$ENV_BUILD_TAG" bundle exec fastlane release flavor:xhj --verbose bundle exec fastlane release flavor:sky --verbose elif [[ "${ENV_BUILD_BRANCH}" == "develop" ]]; then - echo "===Building xhj dev===" + echo "===build dev===${NEXT_VERSION}" bundle exec fastlane beta flavor:xhj env:dev --verbose bundle exec fastlane beta flavor:sky env:dev --verbose elif [[ "${ENV_BUILD_BRANCH}" == "release" ]] || [[ "${ENV_BUILD_BRANCH}" == "feat_devops" ]] ; then - echo "===Building xhj pre===" + echo "===build pre===${NEXT_VERSION}" bundle exec fastlane beta flavor:xhj env:pre --verbose bundle exec fastlane beta flavor:sky env:pre --verbose fi diff --git a/ios/build.sh b/ios/build.sh index 43d1975e..23b90e62 100755 --- a/ios/build.sh +++ b/ios/build.sh @@ -10,16 +10,21 @@ cd ${CI_PROJECT_DIR}/ios bundle exec pod install echo "ENV_BUILD_TAG:${ENV_BUILD_TAG},ENV_BUILD_BRANCH:${ENV_BUILD_BRANCH}" regex='^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z]+\.[0-9]+)?$' -if [[ $ENV_BUILD_TAG =~ $regex ]]; then - echo "===Building xhj release===" +if [[ "${ENV_BUILD_BRANCH}" == "canary_release"]]; then + echo "===build canary_release: ${NEXT_VERSION}" + export ENV_BUILD_TAG=${NEXT_VERSION} + bundle exec fastlane release flavor:xhj --verbose + bundle exec fastlane release flavor:sky --verbose +elif [[ $ENV_BUILD_TAG =~ $regex ]]; then + echo "===build release===$ENV_BUILD_TAG" bundle exec fastlane release flavor:xhj --verbose bundle exec fastlane release flavor:sky --verbose elif [[ "${ENV_BUILD_BRANCH}" == "develop" ]]; then - echo "===Building xhj dev===" + echo "===build dev===${NEXT_VERSION}" bundle exec fastlane beta flavor:xhj env:dev --verbose bundle exec fastlane beta flavor:sky env:dev --verbose elif [[ "${ENV_BUILD_BRANCH}" == "release" ]] || [[ "${ENV_BUILD_BRANCH}" == "feat_devops" ]] ; then - echo "===Building xhj pre===" + echo "===build pre===${NEXT_VERSION}" bundle exec fastlane beta flavor:xhj env:pre --verbose bundle exec fastlane beta flavor:sky env:pre --verbose fi