diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ed73182..3b933c1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,9 +2,6 @@ name: ClashX on: [push] -env: - DEVELOPER_DIR: /Applications/Xcode_12.2.app - jobs: build: runs-on: macOS-latest @@ -13,7 +10,7 @@ jobs: - name: import certs run: | echo `/usr/bin/xcodebuild -version` - openssl aes-256-cbc -k "${{ secrets.ENCRYPTION_SECRET }}" -in ".github/certs/dist.p12.enc" -d -a -out ".github/certs/dist.p12" + openssl aes-256-cbc -k "${{ secrets.ENCRYPTION_SECRET }}" -in ".github/certs/dist.p12.enc" -d -a -out ".github/certs/dist.p12" -md md5 gem install bundler:1.16.2 bundle install diff --git a/.travis.yml.backup b/.travis.yml.backup deleted file mode 100644 index 13ce012..0000000 --- a/.travis.yml.backup +++ /dev/null @@ -1,59 +0,0 @@ -language: objective-c -osx_image: xcode11 -node_js: 10 -before_install: -- openssl aes-256-cbc -K $encrypted_a43c9d4ca4d4_key -iv $encrypted_a43c9d4ca4d4_iv - -in dist.p12.enc -out scripts/travis/dist.p12 -d -- security create-keychain -p mysecretpassword build.keychain -- security default-keychain -s build.keychain -- security unlock-keychain -p mysecretpassword build.keychain -- security set-keychain-settings -t 3600 -u build.keychain -- security import ./scripts/travis/dist.p12 -k build.keychain -T /usr/bin/codesign - -P "" -- 'security set-key-partition-list -S apple-tool:,apple: -s -k mysecretpassword build.keychain' -install: -- bash install_dependency.sh -- cd $TRAVIS_BUILD_DIR/ClashX -- echo `go version` -- brew update -- brew upgrade go || true -- echo `go version` -- python3 build_clash.py -- cd $TRAVIS_BUILD_DIR - -script: -- 'set -o pipefail && xcodebuild -workspace ClashX.xcworkspace -scheme "ClashX" build CODE_SIGN_IDENTITY="Developer - ID Application: Fuzhou West2Online Internet Inc. (MEWHFZ92DY)"|xcpretty' -- echo "Checking SMJobBless Vailded" -- build_dir=`xcodebuild -workspace ClashX.xcworkspace -scheme "ClashX" -showBuildSettings -configuration Debug | grep -m 1 "TARGET_BUILD_DIR" | grep -oEi "\/.*"` -- build_dir=${build_dir}"/ClashX.app" -- python SMJobBlessUtil.py check ${build_dir} -- echo "Check completed" - -before_deploy: -- gem install gym -- bundle install -- fastlane gym -s ClashX -- npm install --global create-dmg -- create-dmg ClashX.app -- mv ClashX*.dmg ClashX.dmg -- fastlane run notarize package:"./ClashX.dmg" bundle_id:"com.west2online.ClashX" - -deploy: - provider: releases - prerelease: false - skip_cleanup: true - api_key: - secure: YKO96FhN1JgvM+EiyciNQCu8nk/t87txxCEA5//XuKGKh+75tVyB+udmEL4sQL2R01vuShO5WwXLRulHkDsVFjNgvTGa64cdG6SMNORMI+mEuBW2L/RPtkaK1GAY+l+iGkH9i1Ng0SaDqL8xSc5rkqicdUV9NSDrg3k+Ck0pu/DvHgwHAmIjN0JG73TuQKfENDlwoa/uj6ztXpxGR30vgobqaex8wwGV+9fs8Jfbh3cO/79iGXweRhJptvvW0EAF1vV95KyEaUYtHP+7NYVVapOCWwek2irdn1HBm4pRib/0bHh/wFQgnI9OoQbKYuKNc6xRnt9h0wWh+SSIwRA1X7jiZTipli+7G2HGXpvW0r8jMskhYxqjcRH5EWB8rGXoiy/16GUuY1SK1ID/oW9nSh5ws6quaRBmpXGyJcoOUq9STsF+HVOF1DOX4qRt8B7049ytdKIRNe3QGmOlc8w3Nyi5y/v9CHWmVWRrKvzJ8qXP/+JJlFIsXhZR+TYqosiX2ZoKpanLv1RFFbU5FxqdaQapQX465FlpoD/6Qhv+2WLmLBgI1+ewR6g/wjLus6unVu4C3ztYov/9Y7OhYlfD+CqdzKOn+98gGAPRV92MfFh8Qa6rXjsVbP4dC09zKze/+OZtCXr36C5M40MYIChVuSUlDSG4IhElylboSYvQ/wQ= - file: - - ClashX.dmg - - on: - repo: yichengchen/clashX - branch: master - tags: true - prerelease: true - -after_deploy: -- 'curl -u yichengchen:$GitHub_Token -X POST https://api.github.com/repos/yichengchen/clashX/pages/builds -H "Accept: application/vnd.github.mister-fantastic-preview+json"' -- fastlane run upload_symbols_to_crashlytics diff --git a/ClashX/Info.plist b/ClashX/Info.plist index 4d4939a..92aaa22 100644 --- a/ClashX/Info.plist +++ b/ClashX/Info.plist @@ -2,8 +2,6 @@ - CFBundleIconFile - AppIcon BETA CFBundleDevelopmentRegion @@ -25,6 +23,8 @@ CFBundleExecutable $(EXECUTABLE_NAME) + CFBundleIconFile + AppIcon CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion diff --git a/ClashX/goClash/build_clash.py b/ClashX/goClash/build_clash.py index eaade9a..df5a7e3 100644 --- a/ClashX/goClash/build_clash.py +++ b/ClashX/goClash/build_clash.py @@ -10,6 +10,11 @@ def get_version(): return line.split("-")[-1].strip()[:6] return "unknown" +def get_full_version(): + with open('./go.mod') as file: + for line in file.readlines(): + if "clash" in line and "ClashX" not in line: + return line.split(" ")[-1].strip() def build_clash(version): build_time = datetime.datetime.now().strftime("%Y-%m-%d-%H%M") diff --git a/ClashX/goClash/go.mod b/ClashX/goClash/go.mod index 96aebd2..8eb843a 100644 --- a/ClashX/goClash/go.mod +++ b/ClashX/goClash/go.mod @@ -1,7 +1,7 @@ module github.com/yichengchen/clashX/ClashX require ( - github.com/Dreamacro/clash v1.3.1-0.20201124145223-0d33dc3eb9bc + github.com/Dreamacro/clash v1.3.1-0.20201217141727-4b1b494164b4 github.com/oschwald/geoip2-golang v1.4.0 github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2 ) diff --git a/ClashX/goClash/go.sum b/ClashX/goClash/go.sum index 34a0e90..380cf72 100644 --- a/ClashX/goClash/go.sum +++ b/ClashX/goClash/go.sum @@ -1,5 +1,5 @@ -github.com/Dreamacro/clash v1.3.1-0.20201124145223-0d33dc3eb9bc h1:OHbKPYyMG9hXwCTO3g6CvRd0DDArAAWeZpMjJpLBx1w= -github.com/Dreamacro/clash v1.3.1-0.20201124145223-0d33dc3eb9bc/go.mod h1:jpzNkbLW28q7hRJ8wu54swTv9ppg4czKqdDo1R15LPo= +github.com/Dreamacro/clash v1.3.1-0.20201217141727-4b1b494164b4 h1:YPnH4YAPVm2sgm13XT9EkVP40vTuwvBDnSDmb/r4eoA= +github.com/Dreamacro/clash v1.3.1-0.20201217141727-4b1b494164b4/go.mod h1:jpzNkbLW28q7hRJ8wu54swTv9ppg4czKqdDo1R15LPo= github.com/Dreamacro/go-shadowsocks2 v0.1.6 h1:PysSf9sLT3Qn8jhlin5v7Rk68gOQG4K5BZFY1nxLGxI= github.com/Dreamacro/go-shadowsocks2 v0.1.6/go.mod h1:LSXCjyHesPY3pLjhwff1mQX72ItcBT/N2xNC685cYeU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/ClashX/goClash/upgrade_core.py b/ClashX/goClash/upgrade_core.py index 35273f3..e126b8e 100644 --- a/ClashX/goClash/upgrade_core.py +++ b/ClashX/goClash/upgrade_core.py @@ -1,7 +1,7 @@ import subprocess import os import re -from build_clash import get_version +from build_clash import get_full_version from build_clash import build_clash @@ -19,10 +19,10 @@ def install(): if __name__ == '__main__': print("start") - current = get_version() + current = get_full_version() print("current version:", current) upgrade_version(current) install() - new_version = get_version() + new_version = get_full_version() print("new version:", new_version, ",start building") build_clash(new_version) diff --git a/dist.p12.enc b/dist.p12.enc deleted file mode 100644 index cbe2b79..0000000 Binary files a/dist.p12.enc and /dev/null differ