From 421c4059c0b7ea4fb6347b7f7b1ba4228b6e18cc Mon Sep 17 00:00:00 2001 From: Edward Chen <18449977+edgchen1@users.noreply.github.com> Date: Tue, 27 Jul 2021 08:16:02 -0700 Subject: [PATCH] [iOS Packaging] Update build definition (#8503) * Add build number into version. * Add parameter for archive upload. --- .../azure-pipelines/mac-ios-packaging-pipeline.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/ci_build/github/azure-pipelines/mac-ios-packaging-pipeline.yml b/tools/ci_build/github/azure-pipelines/mac-ios-packaging-pipeline.yml index 7db861520c..cbbe7aae2f 100644 --- a/tools/ci_build/github/azure-pipelines/mac-ios-packaging-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/mac-ios-packaging-pipeline.yml @@ -4,6 +4,13 @@ parameters: type: boolean default: false +- name: ShouldUploadArchives + displayName: Should the package archives be uploaded? The archives will always be uploaded for a release build. + type: boolean + default: false + +name: "$(Date:yyyyMMdd)$(Rev:rrr)" # build number format + jobs: - job: IosPackaging displayName: "iOS Packaging" @@ -25,11 +32,14 @@ jobs: - bash: | BASE_VERSION=$(cat VERSION_NUMBER) IS_RELEASE_BUILD=$(echo "${{ parameters.IsReleaseBuild }}" | tr "[:upper:]" "[:lower:]") + SHOULD_UPLOAD_ARCHIVES=$(echo "${{ parameters.ShouldUploadArchives }}" | tr "[:upper:]" "[:lower:]") if [[ "${IS_RELEASE_BUILD}" == "true" ]]; then VERSION=${BASE_VERSION} + # always upload archives for a release build + SHOULD_UPLOAD_ARCHIVES="true" else - VERSION="${BASE_VERSION}-dev" + VERSION="${BASE_VERSION}-dev+$(Build.BuildNumber)" fi set_var() { @@ -40,7 +50,7 @@ jobs: } set_var "ORT_POD_VERSION" "${VERSION}" - set_var "ORT_SHOULD_UPLOAD_ARCHIVES" "${IS_RELEASE_BUILD}" + set_var "ORT_SHOULD_UPLOAD_ARCHIVES" "${SHOULD_UPLOAD_ARCHIVES}" displayName: "Set variables" - script: |