Skip to content

Commit

Permalink
Merge tag '0.20.0' into xip-multivolume-expasion
Browse files Browse the repository at this point in the history
# Conflicts:
#	Sources/XcodesKit/XcodeInstaller.swift
#	Sources/xcodes/main.swift
  • Loading branch information
juanjonol committed Sep 11, 2022
2 parents 6fe3a3e + bfefa45 commit d5aead5
Show file tree
Hide file tree
Showing 10 changed files with 614 additions and 65 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
test:
runs-on: macOS-10.15
steps:
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3
- name: Run tests
env:
DEVELOPER_DIR: /Applications/Xcode_12.3.app
Expand Down
28 changes: 28 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/xcodes-Package.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,34 @@
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "xcodes_AppleAPITests"
BuildableName = "xcodes_AppleAPITests"
BlueprintName = "xcodes_AppleAPITests"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Unxip"
BuildableName = "Unxip"
BlueprintName = "Unxip"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
Expand Down
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
2 changes: 2 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ let package = Package(
"PromiseKit",
"PMKFoundation",
"SwiftSoup",
"Unxip",
"Version",
.product(name: "XCModel", package: "XcodeReleases"),
"Rainbow",
Expand All @@ -58,6 +59,7 @@ let package = Package(
resources: [
.copy("Fixtures"),
]),
.target(name: "Unxip"),
.target(
name: "AppleAPI",
dependencies: [
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
Loading

0 comments on commit d5aead5

Please sign in to comment.