Skip to content

Commit

Permalink
ci: Set build number using first 8 characters of commit SHA
Browse files Browse the repository at this point in the history
The build number for the Xcode project is now set using the first 8 characters of the current commit SHA in the GitHub Actions workflow. This ensures a unique build number for each build, making it easier to identify builds.

- Use the `xcrun agvtool new-version -all` command to set the build number
- Build number is set to the first 8 characters of the commit SHA
  • Loading branch information
didhd committed Dec 19, 2024
1 parent 69abe0a commit 1f2e065
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/macos_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4 # Updated to v4

# Set the build number using the first 8 characters of the commit SHA
- name: Set Build Number from Commit SHA
run: |
SHORT_SHA=$(echo $GITHUB_SHA | cut -c1-8)
/usr/bin/xcrun agvtool new-version -all $SHORT_SHA
# Import macOS code-signing certificates
- name: Import Code-Signing Certificates
uses: Apple-Actions/import-codesign-certs@v3
Expand Down
8 changes: 4 additions & 4 deletions Amazon Bedrock Client for Mac.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1.2.5;
CURRENT_PROJECT_VERSION = 1.2.6;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Amazon Bedrock Client for Mac/Preview Content\"";
DEVELOPMENT_TEAM = "";
Expand All @@ -649,7 +649,7 @@
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 1.2.5;
MARKETING_VERSION = 1.2.6;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "AWS.Amazon-Bedrock-Client-for-Mac";
PRODUCT_NAME = "Amazon Bedrock Debug";
Expand All @@ -669,7 +669,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1.2.5;
CURRENT_PROJECT_VERSION = 1.2.6;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Amazon Bedrock Client for Mac/Preview Content\"";
DEVELOPMENT_TEAM = "";
Expand All @@ -692,7 +692,7 @@
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 1.2.5;
MARKETING_VERSION = 1.2.6;
PRODUCT_BUNDLE_IDENTIFIER = "AWS.Amazon-Bedrock-Client-for-Mac";
PRODUCT_NAME = "Amazon Bedrock";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down

0 comments on commit 1f2e065

Please sign in to comment.