Skip to content

pondok-programmer/spmcli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swift Package Manager CLI

You have bad days when should working with Swift Package Manager in command line?

  1. Tedious flags
  2. Or, you don't want to manage script files?

Now, it will be fun!

Requirement

Python 3

  1. 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

  1. Invoke spmcli build

How to install

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

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

Misc

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.

Contributing

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?

Other Mature Tool?

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.

Releases

No releases published

Packages

No packages published

Languages