From d201cad5a490cb608d2e0acff9256501c2fd565b Mon Sep 17 00:00:00 2001 From: mpbw2 <59324545+mpbw2@users.noreply.github.com> Date: Wed, 22 Oct 2025 10:03:11 -0400 Subject: [PATCH] [PM-21706] independent version names in build workflows (#2049) --- .github/workflows/_version.yml | 8 +++++++- .github/workflows/ci-bwa.yml | 1 + .github/workflows/ci-bwpm.yml | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/_version.yml b/.github/workflows/_version.yml index acdc1cc14..81b2716dc 100644 --- a/.github/workflows/_version.yml +++ b/.github/workflows/_version.yml @@ -4,6 +4,8 @@ name: Calculate Version Name and Number on: workflow_dispatch: inputs: + app_codename: + description: "App Name - e.g. 'bwpm' or 'bwa'" base_version_number: description: "Base Version Number - Will be added to the calculated version number" type: number @@ -21,6 +23,9 @@ on: type: boolean workflow_call: inputs: + app_codename: + description: "App Name - e.g. 'bwpm' or 'bwa'" + type: string base_version_number: description: "Base Version Number - Will be added to the calculated version number" type: number @@ -49,6 +54,7 @@ on: value: ${{ jobs.calculate-version.outputs.version_number }} env: + APP_CODENAME: ${{ inputs.app_codename }} BASE_VERSION_NUMBER: ${{ inputs.base_version_number || 0 }} jobs: @@ -100,7 +106,7 @@ jobs: current_year=$(date +%Y) current_month=$(date +%-m) - latest_tag_version=$(git tag --sort=committerdate --list | tail -1) + latest_tag_version=$(git tag -l --sort=-creatordate | grep "$APP_CODENAME" | head -n 1) if [[ -z "$latest_tag_version" ]]; then version_name="${current_year}.${current_month}.${_PATCH_VERSION}" echo "::warning::No tags found, did you checkout? Calculating version from current date: $version_name" diff --git a/.github/workflows/ci-bwa.yml b/.github/workflows/ci-bwa.yml index 8a88a8a9e..9c9ccef3b 100644 --- a/.github/workflows/ci-bwa.yml +++ b/.github/workflows/ci-bwa.yml @@ -54,6 +54,7 @@ jobs: name: Calculate Version Name and Number uses: bitwarden/ios/.github/workflows/_version.yml@main with: + app_codename: "bwa" base_version_number: 30 version_name: ${{ inputs.version-name }} version_number: ${{ inputs.version-number }} diff --git a/.github/workflows/ci-bwpm.yml b/.github/workflows/ci-bwpm.yml index 033c709ed..5adbd95cd 100644 --- a/.github/workflows/ci-bwpm.yml +++ b/.github/workflows/ci-bwpm.yml @@ -57,6 +57,7 @@ jobs: name: Calculate Version Name and Number uses: bitwarden/ios/.github/workflows/_version.yml@main with: + app_codename: "bwpm" base_version_number: 2300 version_name: ${{ inputs.version-name }} version_number: ${{ inputs.version-number }}