Skip to content

Commit

Permalink
Bump version to 0.20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MattKiazyk committed Mar 9, 2022
1 parent adb9b64 commit bfefa45
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 49 deletions.
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ srcdir = Sources
REPODIR = $(shell pwd)
BUILDDIR = $(REPODIR)/.build
SOURCES = $(wildcard $(srcdir)/**/*.swift)

RELEASEBUILDDIR = $(BUILDDIR)/apple/Products/Release/xcodes
.DEFAULT_GOAL = all

.PHONY: all
Expand All @@ -33,19 +33,19 @@ sign: xcodes
--prefix com.robotsandpencils. \
--options runtime \
--timestamp \
"$(BUILDDIR)/release/xcodes"
"$(RELEASEBUILDDIR)"

.PHONY: zip
zip: sign
@rm xcodes.zip 2> /dev/null || true
@zip --junk-paths xcodes.zip "$(BUILDDIR)/release/xcodes"
@zip --junk-paths xcodes.zip "$(RELEASEBUILDDIR)"
@open -R xcodes.zip

# E.g.
# make notarize USERNAME="[email protected]" PASSWORD="@keychain:altool" ASC_PROVIDER=MyOrg
# make notarize TEAMID="ABCD123"
.PHONY: notarize
notarize: zip
./notarize.sh "$(USERNAME)" "$(PASSWORD)" "$(ASC_PROVIDER)" xcodes.zip
./notarize.sh xcodes.zip "$(TEAMID)"

# E.g.
# make bottle VERSION=0.4.0
Expand All @@ -54,23 +54,23 @@ bottle: sign
@rm -r xcodes 2> /dev/null || true
@rm *.tar.gz 2> /dev/null || true
@mkdir -p xcodes/$(VERSION)/bin
@cp "$(BUILDDIR)/release/xcodes" xcodes/$(VERSION)/bin
@cp "$(RELEASEBUILDDIR)" xcodes/$(VERSION)/bin
@tar -zcvf xcodes-$(VERSION).mojave.bottle.tar.gz -C "$(REPODIR)" xcodes
shasum -a 256 xcodes-$(VERSION).mojave.bottle.tar.gz | cut -f1 -d' '
@open -R xcodes-$(VERSION).mojave.bottle.tar.gz

.PHONY: install
install: xcodes
@install -d "$(bindir)"
@install "$(BUILDDIR)/release/xcodes" "$(bindir)"
@install "$(RELEASEBUILDDIR)" "$(bindir)"

.PHONY: uninstall
uninstall:
@rm -rf "$(bindir)/xcodes"

.PHONY: distclean
distclean:
@rm -f $(BUILDDIR)/release
@rm -f $(RELEASEBUILDDIR)

.PHONY: clean
clean: distclean
Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ xcodes install 11.2 GM seed
xcodes install 9.0 --path ~/Archive/Xcode_9.xip
xcodes install --latest-prerelease
xcodes install --latest --directory "/Volumes/Bag Of Holding/"
xcodes install --latest --experimental-unxip
```

You'll then be prompted to enter your Apple ID username and password. You can also provide these with the `XCODES_USERNAME` and `XCODES_PASSWORD` environment variables.
Expand Down Expand Up @@ -106,6 +107,14 @@ Xcode will be installed to /Applications by default, but you can provide the pat
- `version`: Print the version number of xcodes itself
- `signout`: Clears the stored username and password

### Experimental Unxip - for faster unxipping

Thanks to the amazing work by [saagarjhi](https://github.com/saagarjha/unxip) - Xcodes now includes the ability to unxip up to 70% faster on some systems.

```
xcodes install --latest --experimental-unxip
```

### Shell Completion Scripts

xcodes can generate completion scripts which allow you to press the tab key on your keyboard to autocomplete commands and arguments when typing an xcodes command. The steps to install a completion script depend on the shell that you use. More information about installation instructions for different shells and the underlying implementation is available in the [swift-argument-parser repo](https://github.com/apple/swift-argument-parser/blob/main/Sources/ArgumentParser/Documentation.docc/Articles/InstallingCompletionScripts.md).
Expand All @@ -123,7 +132,7 @@ xcodes --generate-completion-script > ~/.oh-my-zsh/completions/_xcodes

## Development

You'll need Xcode 12 in order to build and run xcodes.
You'll need Xcode 13 in order to build and run xcodes.

<details>
<summary>Using Xcode</summary>
Expand Down Expand Up @@ -166,9 +175,7 @@ make bottle VERSION="$VERSION"
# Notarize the release build
# This can take a while
make notarize \
USERNAME="[email protected]" \
PASSWORD="@keychain:ALTool Notarization" \
ASC_PROVIDER="YourAppStoreConnectTeamName"
TEAMID="ABC123"

# Push the new version bump commit and tag
git push --follow-tags
Expand Down
2 changes: 1 addition & 1 deletion Sources/XcodesKit/Version.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import Version

public let version = Version("0.19.0")!
public let version = Version("0.20.0")!
43 changes: 7 additions & 36 deletions notarize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,14 @@
#
# Adapted from https://github.com/keybase/client/blob/46f5df0aa64ff19198ba7b044bbb7cd907c0be9f/packaging/desktop/package_darwin.sh

username="$1"
password="$2"
asc_provider="$3"
file="$4"
file="$1"
team_id="$2"

echo "Uploading to notarization service"

uuid=$(xcrun altool \
--notarize-app \
--primary-bundle-id "com.robotsandpencils.xcodes.zip" \
--username "$username" \
--password "$password" \
--asc-provider "$asc_provider" \
--file "$file" 2>&1 | \
grep 'RequestUUID' | \
awk '{ print $3 }')
result=$(xcrun notarytool submit "$file" \
--keychain-profile "AC_PASSWORD" \
--team-id "$team_id" \
--wait)

echo "Successfully uploaded to notarization service, polling for result: $uuid"

sleep 15
while :
do
fullstatus=$(xcrun altool \
--notarization-info "$uuid" \
--username "$username" \
--password "$password" \
--asc-provider "$asc_provider" 2>&1)
status=$(echo "$fullstatus" | grep 'Status\:' | awk '{ print $2 }')
if [ "$status" = "success" ]; then
echo "Notarization success"
exit 0
elif [ "$status" = "in" ]; then
echo "Notarization still in progress, sleeping for 15 seconds and trying again"
sleep 15
else
echo "Notarization failed, full status below"
echo "$fullstatus"
exit 1
fi
done
echo $result

0 comments on commit bfefa45

Please sign in to comment.