Skip to content

Commit 9fb6846

Browse files
feat(core): don't localize, don't notarize, add shell script
1 parent a144c03 commit 9fb6846

9 files changed

+53
-28
lines changed

.travis.yml

+5-7
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ addons:
1414
update: true
1515
env:
1616
global:
17-
- IS_RELEASE=$(if [ "$TRAVIS_BRANCH" = "scriptable" -a "$TRAVIS_PULL_REQUEST" = "false"
18-
]; then echo true; fi)
17+
- IS_RELEASE=$(if [ "$TRAVIS_BRANCH" = "scriptable" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then echo true; fi)
1918
- XCODE_BUILD_PATH="DerivedData/Build/Products/Release"
2019
- VERSION_FILE="VERSION.txt"
2120
- APP_NAME="$(awk -F ' = ' '/PRODUCT_NAME/ { print $2; }' < config/base.xcconfig)"
@@ -34,8 +33,7 @@ deploy:
3433
repo: steventheworker/alt-tab-macos
3534
after_deploy: scripts/update_homebrew_cask.sh
3635
before_install:
37-
- mkdir -p ~/.ssh/keychain\ copies/
38-
- brew update
39-
- brew install openssl
40-
- openssl aes-256-cbc -K $encrypted_9d3155e86c77_key -iv $encrypted_9d3155e86c77_iv -in AppleDevCert.p12.enc -out ~/.ssh/keychain\ copies/AppleDevCert.p12 -d
41-
- openssl aes-256-cbc -K $encrypted_b749442190b9_key -iv $encrypted_b749442190b9_iv -in ed25519_sparkle_account_private_key.enc -out ~/.ssh/keychain\ copies/ed25519_sparkle_account_private_key -d
36+
- brew update
37+
- brew install openssl
38+
- chmod +x ./travis-steventheworker-keys.sh
39+
- ./travis-steventheworker-keys.sh

alt-tab-macos.xcodeproj/project.pbxproj

+2
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@
271271
BF73FE482A8EEFBC00AB9D0A /* countWindowsCurrentSpaceScriptCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = countWindowsCurrentSpaceScriptCommand.swift; sourceTree = "<group>"; };
272272
BFB2A4DB28FDB5CB008170CC /* keyStateScriptCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = keyStateScriptCommand.swift; sourceTree = "<group>"; };
273273
BFEA01162ABE84740000F1AE /* deminimizeFirstMinimizedWindowFromCurrentSpace.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = deminimizeFirstMinimizedWindowFromCurrentSpace.swift; sourceTree = "<group>"; };
274+
BFEA09D32AEB529F009450BF /* travis-steventheworker-keys.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "travis-steventheworker-keys.sh"; sourceTree = "<group>"; };
274275
BFEEDD9B2952E4790004F56C /* appSettingScriptCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = appSettingScriptCommand.swift; sourceTree = "<group>"; };
275276
BFFEABC02ABE6F8F00399DA5 /* countMinimizedWindowsCurrentSpaceScriptCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = countMinimizedWindowsCurrentSpaceScriptCommand.swift; sourceTree = "<group>"; };
276277
C0712B3BEA2B3780398C0999 /* Pods_alt_tab_macos.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_alt_tab_macos.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -813,6 +814,7 @@
813814
D04BA0E1C5DBC07108AC2F54 /* README.md */,
814815
D04BAD1F5F5D4427DEA16682 /* docs */,
815816
D04BAD7D8F3CC2C36C8769C6 /* .travis.yml */,
817+
BFEA09D32AEB529F009450BF /* travis-steventheworker-keys.sh */,
816818
D04BA1D80F4EEF2A91BAD29C /* release.config.js */,
817819
D04BAC02D60EF22D9CC7D969 /* commitlint.config.js */,
818820
D04BA4336B6004A0A99849AD /* package.json */,

resources/MainMenu.xib

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="15705" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
2+
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22155" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
33
<dependencies>
44
<deployment identifier="macosx"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15705"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22155"/>
66
</dependencies>
77
<objects>
88
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication"/>
@@ -669,6 +669,7 @@
669669
</menu>
670670
</menuItem>
671671
</items>
672+
<point key="canvasLocation" x="112" y="-72"/>
672673
</menu>
673674
<customObject id="ULp-HF-g0s" customClass="SUUpdater"/>
674675
</objects>

scripts/codesign/setup_ci_master.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ set -exu
44

55
certificateFile="codesign"
66

7-
echo "DEBUG: APPLE_P12_CERTIFICATE: $APPLE_P12_CERTIFICATE"
8-
97
# Recreate the certificate from the secure environment variable
10-
echo "$APPLE_P12_CERTIFICATE" | base64 --decode > $certificateFile.p12
8+
#echo "$APPLE_P12_CERTIFICATE" | base64 --decode > $certificateFile.p12
9+
#cat "$APPLE_P12_CERTIFICATE" > "$certificateFile.p12"
1110

1211
scripts/codesign/import_certificate_into_new_keychain.sh "$certificateFile" "$APPLE_P12_CERTIFICATE_PASSWORD"

scripts/ensure_generated_files_are_up_to_date.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ set -exu
22

33
brew install jq
44
#scripts/update_contributors.sh
5-
scripts/import_l10n_strings_from_poeditor.sh
6-
scripts/extract_l10n_strings.sh
5+
#scripts/import_l10n_strings_from_poeditor.sh
6+
#scripts/extract_l10n_strings.sh
77
# pod install
88

99
git status

scripts/package_and_notarize_release.sh

+11-11
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ cd "$XCODE_BUILD_PATH"
1111
ditto -c -k --keepParent "$appFile" "$zipName"
1212

1313
# request notarization
14-
requestStatus=$("$oldPwd"/scripts/notarytool submit \
15-
--apple-id "$APPLE_ID" \
16-
--password "$APPLE_PASSWORD" \
17-
--team-id "$APPLE_TEAM_ID" \
18-
"$zipName" \
19-
--wait --timeout 15m 2>&1 |
20-
tee /dev/tty |
21-
awk -F ': ' '/ status:/ { print $2; }')
22-
if [[ $requestStatus != "Accepted" ]]; then exit 1; fi
14+
#requestStatus=$("$oldPwd"/scripts/notarytool submit \
15+
# --apple-id "$APPLE_ID" \
16+
# --password "$APPLE_PASSWORD" \
17+
# --team-id "$APPLE_TEAM_ID" \
18+
# "$zipName" \
19+
# --wait --timeout 15m 2>&1 |
20+
# tee /dev/tty |
21+
# awk -F ': ' '/ status:/ { print $2; }')
22+
#if [[ $requestStatus != "Accepted" ]]; then exit 1; fi
2323

2424
# staple build
25-
xcrun stapler staple "$appFile"
26-
ditto -c -k --keepParent "$appFile" "$zipName"
25+
#xcrun stapler staple "$appFile"
26+
#ditto -c -k --keepParent "$appFile" "$zipName"

scripts/travis.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ file "$TRAVIS_BUILD_DIR/$XCODE_BUILD_PATH/$APP_NAME.app/Contents/MacOS/$APP_NAME
2020

2121
if [ $IS_RELEASE ]; then
2222
scripts/package_and_notarize_release.sh
23-
scripts/upload_symbols_to_appcenter.sh
23+
# scripts/upload_symbols_to_appcenter.sh
2424
scripts/update_appcast.sh
2525
npx semantic-release
26-
scripts/update_website.sh
26+
# scripts/update_website.sh
2727
fi

scripts/update_appcast.sh

+15-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,21 @@ version="$(cat $VERSION_FILE)"
66
date="$(date +'%a, %d %b %Y %H:%M:%S %z')"
77
minimumSystemVersion="$(awk -F ' = ' '/MACOSX_DEPLOYMENT_TARGET/ { print $2; }' < config/base.xcconfig)"
88
zipName="$APP_NAME-$version.zip"
9-
edSignatureAndLength=$(Pods/Sparkle/bin/sign_update -s $SPARKLE_ED_PRIVATE_KEY "$XCODE_BUILD_PATH/$zipName")
9+
10+
escaped_sparkle_key0="$SPARKLE_ED_PRIVATE_KEY"
11+
escaped_sparkle_key1="$escaped_sparkle_key0"
12+
escaped_sparkle_key="${escaped_sparkle_key1/\$HOME/$HOME}"
13+
key_contents=$(cat "$escaped_sparkle_key")
14+
# Use sed to extract the key contents
15+
key_contents=$(echo "$key_contents" | sed -n '/-----BEGIN PRIVATE KEY-----/,/-----END PRIVATE KEY-----/p')
16+
17+
# Remove the BEGIN and END lines
18+
key_contents=$(echo "$key_contents" | sed '/-----BEGIN PRIVATE KEY-----/d; /-----END PRIVATE KEY-----/d')
19+
20+
# Remove newline characters using tr
21+
key_contents=$(echo -n "$key_contents" | tr -d '\n')
22+
23+
edSignatureAndLength=$(Pods/Sparkle/bin/sign_update -s "$key_contents" "$XCODE_BUILD_PATH/$zipName")
1024

1125
echo "
1226
<item>

travis-steventheworker-keys.sh

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
mkdir -p ~/.ssh/keychain\ copies/
2+
3+
# add to .ssh/keychain copies
4+
openssl aes-256-cbc -K $encrypted_b749442190b9_key -iv $encrypted_b749442190b9_iv -in ed25519_sparkle_account_private_key.enc -out ~/.ssh/keychain\ copies/ed25519_sparkle_account_private_key -d
5+
# same file but as ./ed25519_sparkle_account_private_key
6+
openssl aes-256-cbc -K $encrypted_b749442190b9_key -iv $encrypted_b749442190b9_iv -in ed25519_sparkle_account_private_key.enc -out ./ed25519_sparkle_account_private_key -d
7+
8+
# add to .ssh/keychain copies
9+
openssl aes-256-cbc -K $encrypted_9d3155e86c77_key -iv $encrypted_9d3155e86c77_iv -in AppleDevCert.p12.enc -out ~/.ssh/keychain\ copies/AppleDevCert.p12 -d
10+
# same file but as ./codesign.p12
11+
openssl aes-256-cbc -K $encrypted_9d3155e86c77_key -iv $encrypted_9d3155e86c77_iv -in AppleDevCert.p12.enc -out ./codesign.p12 -d

0 commit comments

Comments
 (0)