Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve release process #1680

Merged
merged 4 commits into from
Jul 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ clean:
xcodebuild -project $(PROJECT) -scheme Vienna -configuration Development clean
xcodebuild -project $(PROJECT) -scheme Vienna -configuration Deployment clean
rm -fr Build
rm -fr DerivedData

localize:
for locale in $(LOCALES); do \
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Version 3.9 of Vienna will require a minimum of macOS 10.13 (High Sierra).

Vienna 3.8.x require a minimum of macOS 10.12 (Sierra).
Vienna 3.6.x and 3.7.x require a minimum of OS X 10.11 (El Capitan).
Vienna 3.5.x requires a minimum of OS X 10.9 (Mavericks).
Vienna 3.1.x to 3.4.x require a minimum of OS X 10.8 (Mountain Lion).
Vienna 3.2.x to 3.5.x require a minimum of OS X 10.9 (Mavericks).
Vienna 3.1.x requires a minimum of OS X 10.8 (Mountain Lion).
Vienna 3.0.x requires a minimum of OS X 10.6 (Snow Leopard).


Expand Down
10 changes: 2 additions & 8 deletions Release Instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ Instructions for building and uploading Vienna binaries to Github and Sourceforg
### Build settings
In Xcode->File->Project settings…, you should have :

- Build System : New Build System
- Derived Data : Project-relative Location
- DerivedData
- Derived Data : Default Location
- Advanced… : Build Location : Custom : Relative to Workspace
- Products : Build/Products
- Intermediates : Build/Intermediates.noindex
Expand All @@ -24,9 +22,6 @@ should be exactly the name of your certificate as it is stored in Keychain.
`PRIVATE_EDDSA_KEY_PATH`
should be the location of the private EdDSA (ed25519) key used by Sparkle 2, which for obvious security reasons should not be located in the source directory !

`PRIVATE_KEY_PATH`
should be the location of the (legacy) private DSA key used by Sparkle, which for obvious security reasons should not be located in the source directory !

If you want to go further in automation of package building, you will have to define three additional environment variables in the `CS-ID.xcconfig` file. These ones are used to automate the use of the `notarytool` command line tool as described in [this page of Apple's documentation](https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution/customizing_the_notarization_workflow).

`APP_STORE_ID`
Expand All @@ -43,7 +38,6 @@ For instance, the content of my `Scripts/Resources/CS-ID.xcconfig` file looks li

CODE_SIGN_IDENTITY = Developer ID Application: Barijaona Ramaholimihaso
PRIVATE_EDDSA_KEY_PATH = $(SRCROOT)/../secrets/vienna_private_eddsa_key.pem
PRIVATE_KEY_PATH = $(SRCROOT)/../secrets/vienna_private_key.pem
APP_STORE_ID = [email protected]
KEYCHAIN_PROFILE = AC_PASSWORD
TEAM_ID = KUU2LM7U9K
Expand Down Expand Up @@ -86,7 +80,7 @@ There are two distinct ways to get the different files needed to publish an upda
- Select the latest archive, click the "Distribute App" button,
- Select "Developer ID" as method of distribution,
- Accept the values proposed in the following prompts,
- Wait for the upload to finish, then a mail notification from Apple informing you that the software was successfully notarized,
- Wait for the upload to finish, then the message informing you that the software was successfully notarized,
- Close the organizer, select scheme "Deployment" at the top of Xcode's main window,
- Run the Deployment scheme,
- The Uploads window should open in the Finder after a while.
Expand Down
56 changes: 40 additions & 16 deletions Scripts/Release-for-upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ tar -a -cf "${TGZ_FILENAME}" --exclude '.DS_Store' Vienna.app
rm -rf Vienna.app

# Output the sparkle change log
SPARKLE_BIN="${SOURCE_ROOT}/DerivedData/Vienna/SourcePackages/artifacts/Sparkle/bin"
SPARKLE_BIN=$(find "${SDK_STAT_CACHE_DIR}" -regex "${SDK_STAT_CACHE_DIR}/${PROJECT}-.*/SourcePackages/artifacts/sparkle/Sparkle/bin")

if [ ! -d "$SPARKLE_BIN" ]; then
printf 'Unable to locate Sparkle binaries in the binary Swift Package. ' 1>&2
printf 'Unable to locate Sparkle binaries in DerivedData. ' 1>&2
printf 'Resolve the Swift Packages in Xcode first.\n' 1>&2
exit 1
fi
Expand All @@ -54,19 +54,7 @@ if [ ! -f "$PRIVATE_EDDSA_KEY_PATH" ]; then
fi
ED_SIGNATURE_AND_LENGTH="$(sign_update "$TGZ_FILENAME" -f "$PRIVATE_EDDSA_KEY_PATH")"

# Generate DSA signature (deprecated; used for backwards compatibility). This
# command outputs only a signature string, cf. the EdDSA signature string.
if [ ! -f "$PRIVATE_KEY_PATH" ]; then
printf 'Unable to load signing private key vienna_private_key.pem. ' 1>&2
printf 'Set PRIVATE_KEY_PATH in Scripts/Resources/CS-ID.xcconfig\n' 1>&2
exit 1
fi

export PATH="$SPARKLE_BIN/old_dsa_scripts:$PATH"

DSA_SIGNATURE="sparkle:dsaSignature=\"$(sign_update "$TGZ_FILENAME" "$PRIVATE_KEY_PATH")\""

pubDate="$(LC_TIME=en_US TZ=GMT date -jf '%FT%TZ' "${VCS_DATE}" '+%a, %d %b %G %T %z')"
pubDate="$(LC_ALL=en_US.UTF8 TZ=GMT date -jf '%FT%TZ' "${VCS_DATE}" '+%a, %d %b %G %T %z')"

cat > "${VIENNA_CHANGELOG}" << EOF
<?xml version="1.0" encoding="UTF-8" ?>
Expand All @@ -84,9 +72,45 @@ cat > "${VIENNA_CHANGELOG}" << EOF
<sparkle:version>${N_VCS_NUM}</sparkle:version>
<sparkle:shortVersionString>${V_VCS_TAG} :${VCS_SHORT_HASH}:</sparkle:shortVersionString>
<sparkle:minimumSystemVersion>${MACOSX_DEPLOYMENT_TARGET}.0</sparkle:minimumSystemVersion>
<enclosure url="${SOURCEFORGE_ASSETS_URL}/${TGZ_FILENAME}" $ED_SIGNATURE_AND_LENGTH $DSA_SIGNATURE type="application/octet-stream" />
<enclosure url="${SOURCEFORGE_ASSETS_URL}/${TGZ_FILENAME}" $ED_SIGNATURE_AND_LENGTH type="application/octet-stream" />
<sparkle:releaseNotesLink>https://www.vienna-rss.com/sparkle-files/noteson${N_VCS_TAG}.html</sparkle:releaseNotesLink>
</item>
<item>
<title>Vienna 3.8.7 :15608906:</title>
<pubDate>Sun, 16 Apr 2023 11:30:01 +0000</pubDate>
<link>https://github.com/ViennaRSS/vienna-rss/releases/tag/v%2F3.8.7</link>
<sparkle:version>8038</sparkle:version>
<sparkle:shortVersionString>3.8.7 :15608906:</sparkle:shortVersionString>
<sparkle:minimumSystemVersion>10.12.0</sparkle:minimumSystemVersion>
<enclosure url="https://downloads.sourceforge.net/project/vienna-rss/v_3.8.7/Vienna3.8.7.tgz" sparkle:edSignature="xxnCIr1urtVhNbkhWxsG9QF32sV9T1yaJBaOenimNrBoevnSyUE8xTiYd63vdKuJ7kIjKRmuI0aHfUzGNnQPCA==" length="12745279" sparkle:dsaSignature="MC4CFQDDrTMFD+sgjYdIxwvhm3kVtP7ycQIVAI3s970AOW9x/jAqJQGXn5/CuhP2" type="application/octet-stream" />
<sparkle:releaseNotesLink>https://www.vienna-rss.com/sparkle-files/noteson3.8.7.html</sparkle:releaseNotesLink>
</item>
<item>
<title>Vienna 3.7.5 :e811b5c2:</title>
<pubDate>Sun, 28 Aug 2022 09:13:53 +0000</pubDate>
<link>https://github.com/ViennaRSS/vienna-rss/releases/tag/v%2F3.7.5</link>
<sparkle:version>7567</sparkle:version>
<sparkle:shortVersionString>3.7.5 :e811b5c2:</sparkle:shortVersionString>
<sparkle:minimumSystemVersion>10.11.0</sparkle:minimumSystemVersion>
<enclosure url="https://downloads.sourceforge.net/project/vienna-rss/v_3.7.5/Vienna3.7.5.tar.gz" sparkle:edSignature="PQA4qGIXEuK940Euet9AoAwtfxqWF5Tcy2+OXpR6GXJOtdQqBUBpUW89mYyt0ZnGCeOkmOsPPKqdut8Bx0BbBw==" length="12255682" sparkle:dsaSignature="MC0CFQCJch8FBCevZenZOdWaZWf37YTeCwIUM3dnyQz/93FsxPDjBn5e1fsnRsA=" type="application/octet-stream" />
<sparkle:releaseNotesLink>https://www.vienna-rss.com/sparkle-files/noteson3.7.5.html</sparkle:releaseNotesLink>
</item>
<item>
<title>Vienna 3.5.10 :9b26c77b:</title>
<pubDate>Sun, 08 Nov 2020 11:58:56 +0000</pubDate>
<link>https://github.com/ViennaRSS/vienna-rss/releases/tag/v%2F3.5.10</link>
<sparkle:minimumSystemVersion>10.9.0</sparkle:minimumSystemVersion>
<enclosure url="https://downloads.sourceforge.net/project/vienna-rss/v_3.5.10/Vienna3.5.10.tar.gz" sparkle:version="7242" sparkle:shortVersionString="3.5.10 :9b26c77b:" length="10865553" sparkle:dsaSignature="MC0CFBzSvYoQZY1XdUjXiEAHKYhhohx+AhUA3DEPV5r1/ZqTJvo5QJ97c3Au/5k=" type="application/octet-stream"/>
<sparkle:releaseNotesLink>https://www.vienna-rss.com/sparkle-files/noteson3.5.10.html</sparkle:releaseNotesLink>
</item>
<item>
<title>Vienna 3.1.16 :891d05ea:</title>
<pubDate>Mon, 25 Sep 2017 22:08:32 +0000</pubDate>
<link>https://github.com/ViennaRSS/vienna-rss/releases/tag/v%2F3.1.16</link>
<sparkle:minimumSystemVersion>10.8.0</sparkle:minimumSystemVersion>
<enclosure url="https://downloads.sourceforge.net/project/vienna-rss/v_3.1.16/Vienna3.1.16.tar.gz" sparkle:version="6187" sparkle:shortVersionString="3.1.16 :891d05ea:" length="7594470" sparkle:dsaSignature="MCwCFEQd1TNnQrBn3O3P5rs1tQCvTqraAhR79VyjOaoNJY52H4ZJYXnxtvKl+w==" type="application/octet-stream"/>
<sparkle:releaseNotesLink>https://www.vienna-rss.com/sparkle-files/noteson3.1.16.html</sparkle:releaseNotesLink>
</item>
</channel>
</rss>

Expand Down
13 changes: 0 additions & 13 deletions Scripts/generate_keys.rb

This file was deleted.

7 changes: 0 additions & 7 deletions Scripts/sign_update.rb
Eitot marked this conversation as resolved.
Show resolved Hide resolved

This file was deleted.

14 changes: 10 additions & 4 deletions Vienna.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,12 @@
3A500129259A640D00AA6AAD /* ArticleStyleLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F2280372271B18A005D1023 /* ArticleStyleLoader.swift */; };
3A50014E259AA2BE00AA6AAD /* WebKitArticleConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FC4A18F257CF775005FF227 /* WebKitArticleConverter.swift */; };
3A60E60B2114AD740004D81D /* URLRequestExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A60E60A2114AD740004D81D /* URLRequestExtensions.m */; };
3A78208729FF534100570771 /* ArchivalChecks.sh in Resources */ = {isa = PBXBuildFile; fileRef = 3A78208629FF534100570771 /* ArchivalChecks.sh */; };
3A78208929FF536400570771 /* PostArchive.sh in Resources */ = {isa = PBXBuildFile; fileRef = 3A78208829FF536400570771 /* PostArchive.sh */; };
3A7BD0DD1989AC7700E9444B /* VNAVerticallyCenteredTextFieldCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A7BD0DC1989AC7700E9444B /* VNAVerticallyCenteredTextFieldCell.m */; };
3A8D9AE325A9DA4B0016F30F /* ArticleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A8D9AE225A9DA4B0016F30F /* ArticleTests.swift */; };
3AB95743258DBC5A00C54E83 /* Browser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FDF6FC5218A26B0002F77E9 /* Browser.swift */; };
3AC411A526BBFDFD004A8700 /* WebKitArticleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AC411A426BBFDFD004A8700 /* WebKitArticleView.swift */; };
3AEE7DE91695FC570018A17D /* SparkleDSAPublicKey.pem in Resources */ = {isa = PBXBuildFile; fileRef = 3AEE7DE81695FC570018A17D /* SparkleDSAPublicKey.pem */; };
435026E6165DD8BE0018EDB7 /* ArticleRef.m in Sources */ = {isa = PBXBuildFile; fileRef = 435026E5165DD8BE0018EDB7 /* ArticleRef.m */; };
4350283E165DE7F60018EDB7 /* NSNotificationAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4350283D165DE7F60018EDB7 /* NSNotificationAdditions.m */; };
43502895165DE9E00018EDB7 /* ActivityLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 43502848165DE9DF0018EDB7 /* ActivityLog.m */; };
Expand Down Expand Up @@ -358,14 +359,15 @@
3A60E6092114AD740004D81D /* URLRequestExtensions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = URLRequestExtensions.h; sourceTree = "<group>"; };
3A60E60A2114AD740004D81D /* URLRequestExtensions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = URLRequestExtensions.m; sourceTree = "<group>"; };
3A6CC18623BBA49D0084ABEE /* Codesigning.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Codesigning.xcconfig; sourceTree = "<group>"; };
3A78208629FF534100570771 /* ArchivalChecks.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = ArchivalChecks.sh; sourceTree = "<group>"; };
3A78208829FF536400570771 /* PostArchive.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = PostArchive.sh; sourceTree = "<group>"; };
3A7BD0DB1989AC7700E9444B /* VNAVerticallyCenteredTextFieldCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VNAVerticallyCenteredTextFieldCell.h; sourceTree = "<group>"; };
3A7BD0DC1989AC7700E9444B /* VNAVerticallyCenteredTextFieldCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VNAVerticallyCenteredTextFieldCell.m; sourceTree = "<group>"; };
3A8D9AE225A9DA4B0016F30F /* ArticleTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ArticleTests.swift; sourceTree = "<group>"; };
3A932D8823BB999A009B8061 /* Vienna.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Vienna.entitlements; sourceTree = "<group>"; };
3A932D8923BB999A009B8061 /* ViennaDeployment.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = ViennaDeployment.entitlements; sourceTree = "<group>"; };
3AC411A426BBFDFD004A8700 /* WebKitArticleView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebKitArticleView.swift; sourceTree = "<group>"; };
3ADBA70C23DDAFCA00156722 /* Notarize.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = Notarize.sh; sourceTree = "<group>"; };
3AEE7DE81695FC570018A17D /* SparkleDSAPublicKey.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SparkleDSAPublicKey.pem; sourceTree = "<group>"; };
430C4ADB1661753F0079C9FC /* autorevision.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = autorevision.h; sourceTree = "<group>"; };
430C4AE0166175C20079C9FC /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
435026E5165DD8BE0018EDB7 /* ArticleRef.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ArticleRef.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1208,7 +1210,9 @@
children = (
2FE5DE71294641550089490B /* CombinePredicateTranslations */,
439824191666B37000FFE219 /* autorevision.sh */,
3A78208629FF534100570771 /* ArchivalChecks.sh */,
3A5482F7168F5F4800887F91 /* Sparkle-setup.sh */,
3A78208829FF536400570771 /* PostArchive.sh */,
4398241A1666B37000FFE219 /* Changes-and-Notes.sh */,
3ADBA70C23DDAFCA00156722 /* Notarize.sh */,
4398241C1666B37000FFE219 /* Release-for-upload.sh */,
Expand Down Expand Up @@ -1265,7 +1269,6 @@
F63DA1721F1CEFC3007CBED4 /* Strings */,
03F33D951DF2A2F900B04FAF /* Assets.xcassets */,
F6209C5923D3FFA700D5537D /* Vienna.sdef */,
3AEE7DE81695FC570018A17D /* SparkleDSAPublicKey.pem */,
);
path = Resources;
sourceTree = "<group>";
Expand Down Expand Up @@ -1876,12 +1879,13 @@
F6D572B41E26AA9900CDA909 /* InfoWindow.xib in Resources */,
F6832F681F10F5DA007920D4 /* MainWindowController.xib in Resources */,
3A0F2A55258FBB8B0036397F /* TabbedBrowserViewController.xib in Resources */,
3A78208729FF534100570771 /* ArchivalChecks.sh in Resources */,
3A0F2A9E258FCB780036397F /* BrowserTab.xib in Resources */,
F6D572BA1E26AAA900CDA909 /* SearchFolder.xib in Resources */,
F626F5F424A76B9100D3AAD8 /* Preferences.storyboard in Resources */,
3AEE7DE91695FC570018A17D /* SparkleDSAPublicKey.pem in Resources */,
F6209C5A23D3FFA700D5537D /* Vienna.sdef in Resources */,
F62580E71E286CEC0035E43C /* RSSSources.plist in Resources */,
3A78208929FF536400570771 /* PostArchive.sh in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -1984,6 +1988,7 @@
};
EAAF336614BEF4DF002A8837 /* Release For Upload */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand All @@ -1999,6 +2004,7 @@
};
F6743B10224BB6980054FE1E /* Build Release Notes */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down
2 changes: 0 additions & 2 deletions Vienna/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@
<true/>
<key>SUEnableInstallerLauncherService</key>
<false/>
<key>SUPublicDSAKeyFile</key>
<string>SparkleDSAPublicKey.pem</string>
<key>SUPublicEDKey</key>
<string>nPwwT+poO5Kmi1NZkE5OveKB8lvQVY20N22E8jgxLCg=</string>
<key>UTExportedTypeDeclarations</key>
Expand Down
20 changes: 0 additions & 20 deletions Vienna/Resources/SparkleDSAPublicKey.pem

This file was deleted.