-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
188 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh | ||
|
||
# sign.sh | ||
# V2rayU | ||
# | ||
# Created by yanue on 2023/8/1. | ||
# Copyright © 2023 yanue. All rights reserved. | ||
|
||
APP=$1 | ||
RELEASE_ID=$2 | ||
FILE=$3 | ||
|
||
SIGNATURE=$(./bin/sign_update ${FILE} | sed 's/[^"]*="\([^"]*\).*/\1/g') | ||
TOKEN=$(security find-generic-password -gws "AppCenter Sparkle Token") | ||
echo "Sign ${APP} release ${RELEASE_ID}, signature $SIGNATURE" | ||
|
||
curl -X "PATCH" "https://api.appcenter.ms/v0.1/apps/${APP}/releases/${RELEASE_ID}" \ | ||
-H "X-API-Token: $TOKEN" \ | ||
-H 'Content-Type: application/json; charset=utf-8' \ | ||
-d $"{ | ||
\"metadata\": { | ||
\"ed_signature\": \"$SIGNATURE\" | ||
} | ||
}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# app_identifier("[[APP_IDENTIFIER]]") # The bundle identifier of your app | ||
# apple_id("[[APPLE_ID]]") # Your Apple email address |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
lane :build do | ||
|
||
addKeyChain | ||
|
||
build_app( | ||
workspace: "V2rayU.xcworkspace", | ||
scheme: "V2rayU", | ||
export_method: "developer-id", | ||
skip_package_pkg: "false", | ||
clean: "true", | ||
derived_data_path: "./build_derived_data" | ||
) | ||
end | ||
|
||
lane :check do | ||
build_app( | ||
workspace: "V2rayU.xcworkspace", | ||
scheme: "V2rayU", | ||
codesigning_identity: "-", | ||
export_method: "developer-id", | ||
skip_package_pkg: "true", | ||
clean: "true", | ||
derived_data_path: "./build_derived_data" | ||
) | ||
end | ||
|
||
lane :addKeyChain do | ||
if is_ci? | ||
|
||
puts("create custom keychain") | ||
|
||
delete_keychain( | ||
name: "v2rayUBuild" | ||
) if File.exist? File.expand_path("~/Library/Keychains/v2rayUBuild-db") | ||
|
||
create_keychain( | ||
name: "v2rayUBuild", | ||
default_keychain: false, | ||
unlock: true, | ||
timeout: 3600, | ||
lock_when_sleeps: false, | ||
password: "password" | ||
) | ||
|
||
import_certificate( | ||
certificate_path: "Build/sign.p12", | ||
keychain_name:"v2rayUBuild", | ||
keychain_password:"v2rayUBuild", | ||
certificate_password:"" | ||
) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Autogenerated by fastlane | ||
# | ||
# Ensure this file is checked in to source control! | ||
|
||
gem 'fastlane-plugin-appcenter' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
fastlane documentation | ||
---- | ||
|
||
# Installation | ||
|
||
Make sure you have the latest version of the Xcode command line tools installed: | ||
|
||
```sh | ||
xcode-select --install | ||
``` | ||
|
||
For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane) | ||
|
||
# Available Actions | ||
|
||
### build | ||
|
||
```sh | ||
[bundle exec] fastlane build | ||
``` | ||
|
||
|
||
|
||
### check | ||
|
||
```sh | ||
[bundle exec] fastlane check | ||
``` | ||
|
||
|
||
|
||
### addKeyChain | ||
|
||
```sh | ||
[bundle exec] fastlane addKeyChain | ||
``` | ||
|
||
|
||
|
||
---- | ||
|
||
This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run. | ||
|
||
More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools). | ||
|
||
The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<testsuites> | ||
<testsuite name="fastlane.lanes"> | ||
|
||
|
||
|
||
|
||
<testcase classname="fastlane.lanes" name="0: Switch to addKeyChain lane" time="0.001135"> | ||
|
||
</testcase> | ||
|
||
|
||
<testcase classname="fastlane.lanes" name="1: is_ci" time="0.000748"> | ||
|
||
</testcase> | ||
|
||
|
||
<testcase classname="fastlane.lanes" name="2: build_app" time="426.002096"> | ||
|
||
<failure message="/Users/yanue/.gem/ruby/2.6.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/actions/actions_helper.rb:67:in `execute_action' /Users/yanue/.gem/ruby/2.6.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action' /Users/yanue/.gem/ruby/2.6.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/runner.rb:229:in `chdir' /Users/yanue/.gem/ruby/2.6.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/runner.rb:229:in `execute_action' /Users/yanue/.gem/ruby/2.6.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name' /Users/yanue/.gem/ruby/2.6.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing' Fastfile:5:in `block in parsing_binding' /Users/yanue/.gem/ruby/2.6.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/lane.rb:33:in `call' /Users/yanue/.gem/ruby/2.6.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute' /Users/yanue/.gem/ruby/2.6.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/runner.rb:45:in `chdir' /Users/yanue/.gem/ruby/2.6.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/runner.rb:45:in `execute' /Users/yanue/.gem/ruby/2.6.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane' /Users/yanue/.gem/ruby/2.6.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle' /Users/yanue/.gem/ruby/2.6.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/commands_generator.rb:110:in `block (2 levels) in run' /Users/yanue/.gem/ruby/2.6.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call' /Users/yanue/.gem/ruby/2.6.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run' /Users/yanue/.gem/ruby/2.6.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command' /Users/yanue/.gem/ruby/2.6.0/gems/fastlane-2.214.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!' /Users/yanue/.gem/ruby/2.6.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!' /Users/yanue/.gem/ruby/2.6.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/commands_generator.rb:354:in `run' /Users/yanue/.gem/ruby/2.6.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/commands_generator.rb:43:in `start' /Users/yanue/.gem/ruby/2.6.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in `take_off' /Users/yanue/.gem/ruby/2.6.0/gems/fastlane-2.214.0/bin/fastlane:23:in `<top (required)>' /Users/yanue/.gem/ruby/2.6.0/bin/fastlane:25:in `load' /Users/yanue/.gem/ruby/2.6.0/bin/fastlane:25:in `<main>' Error packaging up the application" /> | ||
|
||
</testcase> | ||
|
||
</testsuite> | ||
</testsuites> |