diff --git a/.env b/.env new file mode 100644 index 0000000..4dd0bdc --- /dev/null +++ b/.env @@ -0,0 +1,4 @@ +API_TOKEN=f99eefbd91c5f9917125e1adcd3786f5b2520e00 +BUILD_NUMBER=3.8.0 +VERSION=3.8.0 +dsa_signature="Y3fJ8f5ylk9hG9eiLRam66tuArk9MNwF4Ey65dG6BptIa0tLu/VSvSWMJF0o15uMmg7HpCETDqhVuRe6c1YPBQ==" diff --git a/.gitignore b/.gitignore index c49ba18..f8ff223 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ V2rayU.xcodeproj/project.xcworkspace/xcuserdata V2rayU.xcodeproj/xcuserdata Pods V2rayU.xcworkspace/xcuserdata -Build/v2ray-core *.DS_Store .idea *.app diff --git a/Build/appdmg.sh b/Build/appdmg.sh index ebdb490..cbda668 100755 --- a/Build/appdmg.sh +++ b/Build/appdmg.sh @@ -35,7 +35,9 @@ do echo "appdmg V2rayU-64.dmg" rm -f V2rayU-64.dmg appdmg appdmg.json "V2rayU-64.dmg" - rm -fr release/V2rayU.app + #rm -fr release/V2rayU.app + ./sign_update "V2rayU-64.dmg" + break ;; "arm64") @@ -46,7 +48,9 @@ do echo "appdmg V2rayU-arm64.dmg" rm -f V2rayU-arm64.dmg appdmg appdmg.json "V2rayU-arm64.dmg" - rm -fr release/V2rayU.app + #rm -fr release/V2rayU.app + ./sign_update "V2rayU-64.dmg" + break ;; *) echo "请选择";; diff --git a/Build/release.sh b/Build/release.sh index fe400a3..86935e6 100755 --- a/Build/release.sh +++ b/Build/release.sh @@ -210,7 +210,7 @@ function createDmgByAppdmg() { appdmg appdmg.json ${DMG_FINAL} # appcast sign update -# ${AppCastDir}/bin/sign_update ${DMG_FINAL} + ${AppCastDir}/bin/sign_update ${DMG_FINAL} # umount "/Volumes/${APP_NAME}" } diff --git a/Build/sign.p12 b/Build/sign.p12 new file mode 100644 index 0000000..9e04491 Binary files /dev/null and b/Build/sign.p12 differ diff --git a/Build/sign.sh b/Build/sign.sh index 57b2e26..85f56bb 100755 --- a/Build/sign.sh +++ b/Build/sign.sh @@ -5,17 +5,19 @@ # # Created by yanue on 2023/8/1. # Copyright © 2023 yanue. All rights reserved. +set -ex TOKEN=$1 -RELEASE_ID=$2 +release_id=$2 -echo "release ${RELEASE_ID}, token $TOKEN" +echo "token $TOKEN, release ${RELEASE_ID}" -curl -X "PATCH" "https://api.appcenter.ms/v0.1/apps/V2rayU/releases/${RELEASE_ID}" \ +curl -X "PATCH" "https://api.appcenter.ms/v0.1/apps/yanue/V2rayU/releases/${release_id}" \ -H "X-API-Token: $TOKEN" \ -H 'Content-Type: application/json; charset=utf-8' \ - -d $"{ - \"metadata\": { - \"ed_signature\": \"PW8pDnr5VZkmC93gZjUDlHI8gkJSspPoDU3DdhsMkps\" - } - }" + -d '{ + "release_notes": "test", + "metadata": { + "ed_signature": "PW8pDnr5VZkmC93gZjUDlHI8gkJSspPoDU3DdhsMkps" + } +}' diff --git a/Build/sign_update b/Build/sign_update new file mode 100755 index 0000000..2814c16 Binary files /dev/null and b/Build/sign_update differ diff --git a/V2rayU.xcodeproj/project.pbxproj b/V2rayU.xcodeproj/project.pbxproj index 8b2431b..f773ab3 100644 --- a/V2rayU.xcodeproj/project.pbxproj +++ b/V2rayU.xcodeproj/project.pbxproj @@ -39,7 +39,6 @@ 66AD5335241497000070529C /* Shortcut.m in Sources */ = {isa = PBXBuildFile; fileRef = 66AD5330241496FF0070529C /* Shortcut.m */; }; 66BC2B89228C589E00FBB716 /* V2raySubscribe.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66BC2B88228C589E00FBB716 /* V2raySubscribe.swift */; }; 66C3F2762A795D2D004F1234 /* Pluginfile in Resources */ = {isa = PBXBuildFile; fileRef = 66C3F2752A795D2C004F1234 /* Pluginfile */; }; - 66C3F2792A795DD5004F1234 /* Appfile in Resources */ = {isa = PBXBuildFile; fileRef = 66C3F2772A795DD5004F1234 /* Appfile */; }; 66C3F27A2A795DD5004F1234 /* Fastfile in Resources */ = {isa = PBXBuildFile; fileRef = 66C3F2782A795DD5004F1234 /* Fastfile */; }; 66C3F27C2A795F44004F1234 /* Readme.md in Resources */ = {isa = PBXBuildFile; fileRef = 66C3F27B2A795F44004F1234 /* Readme.md */; }; 66F07CF9236D79540088A4AE /* ping.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66F07CF8236D79540088A4AE /* ping.swift */; }; @@ -160,7 +159,6 @@ 66BC2B88228C589E00FBB716 /* V2raySubscribe.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = V2raySubscribe.swift; sourceTree = ""; }; 66C3F2732A795A86004F1234 /* sign.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = sign.sh; sourceTree = ""; }; 66C3F2752A795D2C004F1234 /* Pluginfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Pluginfile; sourceTree = ""; }; - 66C3F2772A795DD5004F1234 /* Appfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Appfile; sourceTree = ""; }; 66C3F2782A795DD5004F1234 /* Fastfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Fastfile; sourceTree = ""; }; 66C3F27B2A795F44004F1234 /* Readme.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = Readme.md; sourceTree = ""; }; 66C5B194240B58B8008A22CA /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = ../en.lproj/PreferenceAdvance.strings; sourceTree = ""; }; @@ -348,7 +346,6 @@ 66C3F2742A795D2C004F1234 /* fastlane */ = { isa = PBXGroup; children = ( - 66C3F2772A795DD5004F1234 /* Appfile */, 66C3F2782A795DD5004F1234 /* Fastfile */, 66C3F2752A795D2C004F1234 /* Pluginfile */, 66C3F27B2A795F44004F1234 /* Readme.md */, @@ -545,7 +542,6 @@ 6610ECB721742AFD008FC401 /* MainMenu.xib in Resources */, 66107B8622DEDBE4002FFB60 /* Localizable.strings in Resources */, 66F411B521CA8921007AAC10 /* cmd.sh in Resources */, - 66C3F2792A795DD5004F1234 /* Appfile in Resources */, 664EB377216C9A5F00B6AE0D /* Assets.xcassets in Resources */, 66C3F27A2A795DD5004F1234 /* Fastfile in Resources */, 66FEAD53217EE14C009DECF9 /* ConfigWindow.xib in Resources */, diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 010f186..da75a6d 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -28,7 +28,7 @@ lane :upload do version: ENV["VERSION"], app_os: 'macOS', file: "./Build/V2rayU-64.dmg", - dsa_signature: "PW8pDnr5VZkmC93gZjUDlHI8gkJSspPoDU3DdhsMkps" + dsa_signature: ENV["dsa_signature"] ) end diff --git a/fastlane/Pluginfile b/fastlane/Pluginfile index 966c31a..756bff8 100644 --- a/fastlane/Pluginfile +++ b/fastlane/Pluginfile @@ -3,4 +3,3 @@ # Ensure this file is checked in to source control! gem 'fastlane-plugin-appcenter' -gem 'fastlane-plugin-dmg' diff --git a/fastlane/Readme.md b/fastlane/Readme.md index f04487f..91c97b2 100644 --- a/fastlane/Readme.md +++ b/fastlane/Readme.md @@ -19,10 +19,6 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do [bundle exec] fastlane build ``` -``` -gem install aws-partitions public_suffix addressable --user-install -``` - ### upload ```sh @@ -39,14 +35,6 @@ gem install aws-partitions public_suffix addressable --user-install -### make_dmg - -```sh -[bundle exec] fastlane make_dmg -``` - - - ### addKeyChain ```sh diff --git a/fastlane/report.xml b/fastlane/report.xml index dcaa892..52a4661 100644 --- a/fastlane/report.xml +++ b/fastlane/report.xml @@ -4,5 +4,10 @@ + + + + +