mirror of
https://github.com/TrustTunnel/TrustTunnel.git
synced 2026-04-28 03:39:53 +00:00
Squashed commit of the following: commit01359b7031Author: Ilia Zhirov <i.zhirov@adguard.com> Date: Mon Mar 23 21:26:58 2026 +0500 Update prebuilt-arch list in README.md commit2dd63cb81aAuthor: Ilia Zhirov <i.zhirov@adguard.com> Date: Tue Mar 17 13:49:28 2026 +0500 More unification with client build commit6fb885198dAuthor: Ilia Zhirov <i.zhirov@adguard.com> Date: Tue Mar 17 13:47:24 2026 +0500 Add Gemfile.lock commit62a2ee7febAuthor: Ilia Zhirov <i.zhirov@adguard.com> Date: Fri Mar 13 21:00:15 2026 +0500 More unification with trusttunnel-client deployment plan commite60ac36d5aAuthor: Ilia Zhirov <i.zhirov@adguard.com> Date: Fri Mar 13 20:49:06 2026 +0500 Remove REPO_ROOT variable commit145949a852Author: Ilia Zhirov <i.zhirov@adguard.com> Date: Fri Mar 13 20:42:16 2026 +0500 Unify codesign approach with trusttunnel-client commit38baac17feAuthor: Ilia Zhirov <i.zhirov@adguard.com> Date: Fri Mar 13 18:26:00 2026 +0500 Use separate macOS notarization identifier for setup_wizard commit296e7ea9abAuthor: Ilia Zhirov <i.zhirov@adguard.com> Date: Fri Mar 13 18:17:57 2026 +0500 Integrate fastlane-based macOS signing into Bamboo deploy pipeline commite2c3bede74Author: Ilia Zhirov <i.zhirov@adguard.com> Date: Fri Mar 13 18:12:26 2026 +0500 Add supporting fastlane files for macOS release signing commit8e2bc2e87dAuthor: Ilia Zhirov <i.zhirov@adguard.com> Date: Fri Mar 13 18:06:28 2026 +0500 Add fastlane automation for macOS endpoint release signing commitaf89eef0f3Author: Ilia Zhirov <i.zhirov@adguard.com> Date: Fri Mar 13 17:40:06 2026 +0500 Add macOS dSYM artifacts to Bamboo deploy pipeline commit21cd7d99d7Author: Ilia Zhirov <i.zhirov@adguard.com> Date: Fri Mar 13 17:30:24 2026 +0500 Add universal macOS release artifact to Bamboo deploy pipeline
96 lines
2.8 KiB
Ruby
96 lines
2.8 KiB
Ruby
require 'tmpdir'
|
|
import "Subroutings"
|
|
|
|
before_all do |_lane, _options|
|
|
ENV["BUILD_PATH"] ||= File.join(Dir.pwd, ENV["BUILD_DIR"] || "build_macos")
|
|
|
|
app_store_connect_api_key(
|
|
key_id: ENV["bamboo_appStoreConnectApiKeyId"],
|
|
issuer_id: ENV["bamboo_appStoreConnectApiKeyIssuerId"],
|
|
key_content: ENV["bamboo_appStoreConnectApiKeyBase64Password"],
|
|
is_key_content_base64: true,
|
|
)
|
|
end
|
|
|
|
desc "Installs or updates certificates for macOS release signing"
|
|
lane :certs do |options|
|
|
app_id = ENV["MATCH_APP_IDENTIFIER"] || "com.adguard.trusttunnel.endpoint"
|
|
keychain_path = nil
|
|
|
|
if ENV["KEYCHAIN_PATH_LOCAL"] == 'true'
|
|
keychain_path = File.join(ENV["BUILD_PATH"], "certs", ENV["MATCH_KEYCHAIN_NAME"])
|
|
create_local_keychain(keychain_path)
|
|
UI.success("Keychain path: #{keychain_path}")
|
|
end
|
|
|
|
match(
|
|
step_name: "Sync Developer id identity and provisioning profiles",
|
|
app_identifier: [app_id],
|
|
type: "developer_id",
|
|
keychain_name: keychain_path,
|
|
readonly: "true",
|
|
force: "false",
|
|
force_for_new_devices: "false",
|
|
verbose: options[:verbose].nil? ? "false" : options[:verbose],
|
|
git_branch: "standalone",
|
|
clone_branch_directly: "true",
|
|
shallow_clone: "true",
|
|
platform: "macos",
|
|
fail_on_name_taken: "true",
|
|
skip_provisioning_profiles: "true",
|
|
)
|
|
end
|
|
|
|
desc "Remove local keychain, which contains certificates"
|
|
lane :remove_certs do |_options|
|
|
step_name = "Remove local keychain, which contains certificates"
|
|
keychain_path = File.join(ENV["BUILD_PATH"], "certs", ENV["MATCH_KEYCHAIN_NAME"])
|
|
|
|
if !File.exist?(keychain_path)
|
|
Actions.execute_action(step_name) do
|
|
UI.success("No local keychain")
|
|
end
|
|
next
|
|
end
|
|
|
|
delete_keychain(
|
|
keychain_path: keychain_path,
|
|
step_name: step_name
|
|
)
|
|
end
|
|
|
|
desc "Notarize bundle using default credentials"
|
|
desc "Required options:"
|
|
desc " - bundle: STRING Path to bundle"
|
|
desc " - id: STRING Bundle id, used for notary service"
|
|
lane :notari do |options|
|
|
UI.user_error!("Missing argument: 'id:<BUNDLE_ID>'") if options[:id].nil?
|
|
UI.user_error!("Missing argument: 'bundle:<BUNDLE_PATH>'") if options[:bundle].nil?
|
|
|
|
app_store_connect_api_key(
|
|
key_id: ENV["bamboo_appStoreConnectApiKeyId"],
|
|
issuer_id: ENV["bamboo_appStoreConnectApiKeyIssuerId"],
|
|
key_content: ENV["bamboo_appStoreConnectApiKeyBase64Password"],
|
|
is_key_content_base64: true,
|
|
)
|
|
|
|
bundle_path = options[:bundle]
|
|
bundle_id = options[:id]
|
|
|
|
Dir.mktmpdir do |temp_dir|
|
|
notari_path = File.join(temp_dir, "to_notarize.zip")
|
|
compress_bundle(bundle_path, notari_path)
|
|
|
|
notarize(
|
|
step_name: "Notarizing bundle",
|
|
package: notari_path,
|
|
use_notarytool: "true",
|
|
bundle_id: bundle_id,
|
|
skip_stapling: "true",
|
|
print_log: "true",
|
|
verbose: "false"
|
|
)
|
|
end
|
|
end
|
|
|
|
ENV["FASTLANE_PROC"] = "true"
|