Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/base-installer-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ jobs:
- name: Compute build number
id: build_number
run: |
$lastJenkins = 1097 # The last base build from jenkins
$lastJenkins = 1100 # The last base build from jenkins, rounded to the next hundred
$githubRun = $env:GITHUB_RUN_NUMBER
$combined = $lastJenkins + $githubRun
echo "Calculated build number: $combined"
echo "RELEASE_BASE_BUILD_NUMBER=$combined" >> $env:GITHUB_ENV
echo "RELEASE_BUILD_NUMBER=$combined" >> $env:GITHUB_ENV

- name: Checkout Files
uses: actions/checkout@v4
Expand Down Expand Up @@ -237,7 +237,7 @@ jobs:
$offlineFile = Split-Path $offlineExe -Leaf
$onlineFile = Split-Path $onlineExe -Leaf

$s3BasePath = "jobs/FieldWorks-Win-all-Release-Base/$($env:RELEASE_BASE_BUILD_NUMBER)"
$s3BasePath = "jobs/FieldWorks-Win-all-Release-Base/$($env:RELEASE_BUILD_NUMBER)"
$offlineS3Key = "$s3BasePath/$offlineFile"
$onlineS3Key = "$s3BasePath/$onlineFile"

Expand Down Expand Up @@ -272,8 +272,8 @@ jobs:
if: ${{ inputs.make_release == 'true' }}
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836
with:
tag_name: build-${{ env.RELEASE_BASE_BUILD_NUMBER }}
name: "FieldWorks Base Build #${{ env.RELEASE_BASE_BUILD_NUMBER }}"
tag_name: build-${{ env.RELEASE_BUILD_NUMBER }}
name: "FieldWorks Base Build #${{ env.RELEASE_BUILD_NUMBER }}"
draft: false
prerelease: true
fail_on_unmatched_files: true
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/patch-installer-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ jobs:
- name: Compute build number for archival
id: build_number
run: |
$lastJenkins = 1976 # The last patch build from jenkins
$lastJenkins = 2000 # The last patch build from jenkins, rounded to the next hundred
$githubRun = $env:GITHUB_RUN_NUMBER
$combined = $lastJenkins + $githubRun
echo "Calculated build number: $combined"
echo "BuildVersionSegment=$combined" >> $env:GITHUB_ENV
echo "RELEASE_BUILD_NUMBER=$combined" >> $env:GITHUB_ENV

- name: Checkout Files
uses: actions/checkout@v4
Expand Down Expand Up @@ -253,7 +253,6 @@ jobs:
env:
BASE_RELEASE: ${{ inputs.base_release || 'build-1155' }}
BASE_BUILD_NUMBER: ${{ inputs.base_build_number || '' }}
BUILD_VERSION_SEGMENT: ${{ env.BuildVersionSegment }}
run: |
# The github action base-installer-cd will make releases with a tag build-[build number]
# manually created releases with Jenkins artifacts need to use existing tags so we need
Expand All @@ -266,7 +265,7 @@ jobs:
}
$baseBuildNumber = "_b$($env:BASE_RELEASE -replace '^build-','')"
} else {
throw "Must have a base_build_number nor a valid base_release to support automatic updating"
throw "Must have a base_build_number or a valid base_release to support automatic updating"
}
$patchPath = "${{ steps.find_patch.outputs.patch_file }}"
if (-not (Test-Path $patchPath)) {
Expand All @@ -279,7 +278,7 @@ jobs:
throw "Unexpected patch filename format: $patchFile"
}
$patchWithBaseInName = "$($Matches[1])${baseBuildNumber}$($Matches[2])"
$s3Key = "jobs/FieldWorks-Win-all-Release-Patch/$($env:BUILD_VERSION_SEGMENT)/$patchWithBaseInName"
$s3Key = "jobs/FieldWorks-Win-all-Release-Patch/$($env:RELEASE_BUILD_NUMBER)/$patchWithBaseInName"
aws s3 cp $patchPath "s3://flex-updates/$s3Key"
Write-Host "Uploaded to s3://flex-updates/$s3Key"

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ _user.mak.lnx
*.log
*.vshost.exe*
*.sdf
*.tmp
*.opensdf
*.orig
.project
Expand Down
6 changes: 3 additions & 3 deletions Build/Src/FwBuildTasks/Substitute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ public override bool Execute()
var numberOfDays = Convert.ToInt32(Math.Truncate(DateTime.Now.ToOADate())).ToString();
fileContents = regex.Replace(fileContents, numberOfDays);

// GHA builds set the RELEASE_BASE_BUILD_NUMBER in the environment
var buildNumber = Environment.GetEnvironmentVariable("RELEASE_BASE_BUILD_NUMBER");
// GHA builds set the RELEASE_BUILD_NUMBER in the environment
var buildNumber = Environment.GetEnvironmentVariable("RELEASE_BUILD_NUMBER");
if (string.IsNullOrEmpty(buildNumber))
{
// fall back to number of days if no RELEASE_BASE_BUILD_NUMBER is in the environment
// fall back to number of days if no RELEASE_BUILD_NUMBER is in the environment
buildNumber = numberOfDays;
}
regex = new Regex("\\$BUILDNUMBER");
Expand Down
Loading