You have bad days when should working with Swift Package Manager in command line?
- Tedious flags
- Or, you don't want to manage script files?
Now, it will be fun!
Python 3
- Write your flags in SPMCLI.yaml
# SPMCLI.yaml
linux:
build:
-Xswiftc:
- "-target"
- "-DDEBUG"
-Xcc:
- "-DHAVE_INTTYPES_H"
mac:
build:
-Xlinker:
- "./libHello.a"
See example in SPMCLI.yaml
- Invoke
spmcli build
This helper script will be available through pip
, make sure you have Python3 in your system.
For now, you can install using this way.
git clone git clone https://github.com/muizidn/spmcli.git
cd spmcli
pip3 install -r requirements.txt
pyinstaller --onefile spmcli
export PATH=${PWD}/dist:$PATH
#or update your .bashrc
See HowItWorks
There's xcproj
branch which has experimental feature for xcodeproj generation. But it has bugs which requires you to manually edit the generated xcconfig if the generated Xcodeproj fail.
SPMCLI is just a helper. Try to design your idea so it can be implemented in SwiftPM first, then apply it in SPMCLI. We hope SPM will provide nice way to set our configurations in the future. But you can always make an issue. Why not?
You can use facebook buck or google bazel which is extensible, fast, and has so many features. Or, if you like, you can use Rakefile.