mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 04:48:53 +00:00
feat(ios): update code sign identity script (#12938)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Improved the iOS release workflow to include automated version setup and code signing identity updates during the release process. * Introduced a script to automatically update iOS project code signing settings for enhanced reliability. * Enhanced versioning script to update the iOS marketing version in the project file. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -48,7 +48,7 @@ update_app_stream_version() {
|
||||
fi
|
||||
|
||||
echo "Updating $file_path with appVersion $new_version"
|
||||
# version is at
|
||||
# version is at
|
||||
# <releases>
|
||||
# <release version="0.21.0" date="yyyy-MM-dd">
|
||||
# <url>https://github.com/toeverything/AFFiNE/releases/tag/v0.21.0</url>
|
||||
@@ -56,11 +56,11 @@ update_app_stream_version() {
|
||||
# </releases>
|
||||
# We need to update the version and the url
|
||||
current_date=$(date +"%Y-%m-%d")
|
||||
|
||||
|
||||
# Use sed to update the version, date, and URL in the releases section
|
||||
sed -i.bak -E "s|<release version=\"[^\"]*\" date=\"[^\"]*\">|<release version=\"$new_version\" date=\"$current_date\">|" "$file_path"
|
||||
sed -i.bak -E "s|<url>https://github.com/toeverything/AFFiNE/releases/tag/v[^<]*</url>|<url>https://github.com/toeverything/AFFiNE/releases/tag/v$new_version</url>|" "$file_path"
|
||||
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Failed to update the appVersion."
|
||||
return 1
|
||||
@@ -71,6 +71,32 @@ update_app_stream_version() {
|
||||
rm "$file_path".bak
|
||||
}
|
||||
|
||||
update_ios_marketing_version() {
|
||||
local file_path=$1
|
||||
local new_version=$2
|
||||
|
||||
# Check if file exists
|
||||
if [ ! -f "$file_path" ]; then
|
||||
echo "Error: File does not exist at $file_path."
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "Updating $file_path with MARKETING_VERSION $new_version"
|
||||
|
||||
# Use sed to replace the MARKETING_VERSION value with the new version
|
||||
sed -i.bak -E "s/MARKETING_VERSION = [^;]*;/MARKETING_VERSION = $new_version;/g" "$file_path"
|
||||
|
||||
# Check if sed command succeeded
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Failed to update the MARKETING_VERSION."
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "MARKETING_VERSION in $file_path updated to $new_version"
|
||||
|
||||
rm "$file_path".bak
|
||||
}
|
||||
|
||||
new_version=$1
|
||||
|
||||
update_app_version_in_helm_charts ".github/helm/affine/Chart.yaml" "$new_version"
|
||||
@@ -79,4 +105,6 @@ update_app_version_in_helm_charts ".github/helm/affine/charts/sync/Chart.yaml" "
|
||||
update_app_version_in_helm_charts ".github/helm/affine/charts/renderer/Chart.yaml" "$new_version"
|
||||
update_app_version_in_helm_charts ".github/helm/affine/charts/doc/Chart.yaml" "$new_version"
|
||||
|
||||
update_app_stream_version "packages/frontend/apps/electron/resources/affine.metainfo.xml" "$new_version"
|
||||
update_app_stream_version "packages/frontend/apps/electron/resources/affine.metainfo.xml" "$new_version"
|
||||
|
||||
update_ios_marketing_version "packages/frontend/apps/ios/App/App.xcodeproj/project.pbxproj" "$new_version"
|
||||
|
||||
Reference in New Issue
Block a user