Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A script that makes it easier to use the Swift Package Manager by making common commands less verbose ๐Ÿ‘
#!/usr/bin/env bash
# Put this file in /usr/local/bin and then run chmod +x on it to make it executable
case $command in
"init" )
swift package init "$@"
"init-cli" )
swift package init --type executable
"update" )
swift package update "$@"
"build" )
swift build "$@"
"test" )
swift test "$@"
"run" )
swift run "$@"
"install" )
swift build -c release -Xswiftc -static-stdlib
install .build/Release/$PACKAGE /usr/local/bin/$PACKAGE
"manifest" )
open Package.swift
"xcode" )
swift package generate-xcodeproj "$@"
open *.xcodeproj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment