Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add update whats new lane #26

Merged
merged 1 commit into from
Oct 23, 2024
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,5 @@ ios/fastlane/report.xml
.firebase
key
.env
ios/fastlane/metadata
iOS/fastlane/screenshots
2 changes: 2 additions & 0 deletions ios/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ Runner/GeneratedPluginRegistrant.*
!default.mode2v3
!default.pbxuser
!default.perspectivev3

fastlane/api_key_json.json
22 changes: 13 additions & 9 deletions ios/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.986.0)
aws-sdk-core (3.209.1)
aws-partitions (1.994.0)
aws-sdk-core (3.211.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.94.0)
aws-sdk-core (~> 3, >= 3.207.0)
aws-sdk-kms (1.95.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.167.0)
aws-sdk-core (~> 3, >= 3.207.0)
aws-sdk-s3 (1.169.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.10.0)
aws-sigv4 (1.10.1)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.2.0)
Expand Down Expand Up @@ -68,7 +68,7 @@ GEM
faraday_middleware (1.2.1)
faraday (~> 1.0)
fastimage (2.3.1)
fastlane (2.224.0)
fastlane (2.225.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
Expand All @@ -84,6 +84,7 @@ GEM
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
fastlane-sirp (>= 1.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-apis-androidpublisher_v3 (~> 0.3)
google-apis-playcustomapp_v1 (~> 0.1)
Expand All @@ -109,6 +110,8 @@ GEM
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
fastlane-sirp (1.0.0)
sysrandom (~> 1.0)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.54.0)
google-apis-core (>= 0.11.0, < 2.a)
Expand Down Expand Up @@ -184,6 +187,7 @@ GEM
simctl (1.6.10)
CFPropertyList
naturally
sysrandom (1.0.5)
terminal-notifier (2.0.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
Expand Down
6 changes: 3 additions & 3 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2410151246;
CURRENT_PROJECT_VERSION = 2410201826;
DEVELOPMENT_TEAM = F694X76A5X;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
Expand Down Expand Up @@ -492,7 +492,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2410151246;
CURRENT_PROJECT_VERSION = 2410201826;
DEVELOPMENT_TEAM = F694X76A5X;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
Expand All @@ -519,7 +519,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2410151246;
CURRENT_PROJECT_VERSION = 2410201826;
DEVELOPMENT_TEAM = F694X76A5X;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
Expand Down
2 changes: 1 addition & 1 deletion ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2410151246</string>
<string>2410201826</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>https</string>
Expand Down
1 change: 1 addition & 0 deletions ios/fastlane/Deliverfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
force(true)
70 changes: 69 additions & 1 deletion ios/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,73 @@ platform :ios do
)
)
end


desc "Update whats new to App Store"
lane :update_whats_new do
UI.header "🚀 Update whats new to App Store"

release_note_message = "- Bug fixes and performance improvements"
languages_code = ["zh-Hans", "zh-Hant", "fr-FR", "de-DE", "es-ES", "es-MX", "en-AU", "en-GB", "fr-CA", "en-CA", "en-US"]
release_notes = create_same_release_notes(languages_code, release_note_message)

UI.header "#{release_notes}"

deliver(
api_key: app_store_api_key,
skip_screenshots: true,
skip_app_version_update: true,
skip_binary_upload: true,
precheck_include_in_app_purchases: false,
force: true,
release_notes: release_notes
)
end

private_lane :app_store_api_key do
app_store_connect_api_key(
key_id: ENV['APPSTORE_KEY_ID'],
issuer_id: ENV['APPSTORE_ISSUER_ID'],
key_filepath: ENV['APPSTORE_KEY_FILEPATH']
)
end

def create_same_release_notes(languages_code, release_note_message)
release_notes = {}

languages_code.each do |code|
release_notes[code] = release_note_message
end

return release_notes
end

lane :list_languages do
UI.header "🔍 Fetching available languages for the app"

key_value = File.read(ENV['APPSTORE_KEY_FILE_NAME'])
final_api_key_value = key_value.gsub("\\n", "\n")

api_key_json = {
"key_id": ENV['APPSTORE_KEY_ID'],
"issuer_id": ENV['APPSTORE_ISSUER_ID'],
"key": key_value,
"in_house": false
}

File.write("api_key_json.json", JSON.dump(api_key_json))

# Download metadata
sh "bundle exec fastlane deliver download_metadata --api_key_path api_key_json.json --app_identifier com.cdmHUB.SwiftComp"

# Read the metadata files to get the list of languages
metadata_dir = "./metadata"
languages = Dir.entries(metadata_dir).select { |entry| File.directory? File.join(metadata_dir, entry) and !(entry =='.' || entry == '..') }

UI.header "🔍 Available languages"
# Print the list of languages
languages.each { |lang| UI.message "Language: #{lang}" }

# Return the list of languages
languages
end
end
16 changes: 16 additions & 0 deletions ios/fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,22 @@ Push a new beta build to TestFlight



### ios update_whats_new

```sh
[bundle exec] fastlane ios update_whats_new
```

Update whats new to App Store

### ios list_languages

```sh
[bundle exec] fastlane ios list_languages
```



----

This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
Expand Down
Loading