Skip to content

Commit

Permalink
Improve release process
Browse files Browse the repository at this point in the history
- Switch to default location for project's derived data, as suggested in
  https://developer.apple.com/forums/thread/678974 to avoid slow
  resolution of package graphs;
- Search Sparkle binaries in ${HOME}/Library/Developer/Xcode/DerivedData
- Fix unfit localization of publication date in app feed; 
- Remove old scripts, clarify which scripts are used in project;
- Make execution of scripts in "Prepare Upload" target independent of
  dependency analysis.
  • Loading branch information
barijaona committed May 1, 2023
1 parent 3c1ed7a commit cb42c9d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 28 deletions.
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
6 changes: 2 additions & 4 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 Down Expand Up @@ -86,7 +84,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
6 changes: 3 additions & 3 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 @@ -66,7 +66,7 @@ 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 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

This file was deleted.

10 changes: 10 additions & 0 deletions Vienna.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@
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 */; };
Expand Down Expand Up @@ -357,6 +359,8 @@
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>"; };
Expand Down Expand Up @@ -1207,7 +1211,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 @@ -1874,12 +1880,14 @@
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 @@ -1982,6 +1990,7 @@
};
EAAF336614BEF4DF002A8837 /* Release For Upload */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand All @@ -1997,6 +2006,7 @@
};
F6743B10224BB6980054FE1E /* Build Release Notes */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down

0 comments on commit cb42c9d

Please sign in to comment.