|
| 1 | +# Development |
| 2 | + |
| 3 | +**Requirements** |
| 4 | + |
| 5 | +``` |
| 6 | +brew install swiftformat |
| 7 | +brew install swiftlint |
| 8 | +brew install go-task |
| 9 | +``` |
| 10 | + |
| 11 | +## Tasks |
| 12 | + |
| 13 | +- `task build` Build project |
| 14 | +- `task run` Run example |
| 15 | +- `task test` Run tests |
| 16 | +- `task format` Format using rules in `.swiftformat` |
| 17 | +- `task lint` Lint using rules in `.swiftlint` |
| 18 | +- `task install` Install app in `$HOME/.local/bin/` |
| 19 | +- `task uninstall` Removes app from `$HOME/.local/bin/` |
| 20 | +- `task artifacts` Produces artifact in `.build/release/` |
| 21 | +- `task tag` Pushes git tag from `VERSION` |
| 22 | +- `task release` Creates GitHub release from artifacts |
| 23 | +- `task sha` Prints hashes from artifacts |
| 24 | +- `task clean` Removes build directory `.build` |
| 25 | + |
| 26 | +## Release |
| 27 | + |
| 28 | +1. Increase version number in `VERSION` |
| 29 | +2. `task release` to tag and push |
| 30 | +3. `task sha` to print hashes to stdout |
| 31 | +4. Make changes in [homebrew-made](https://github.com/oschrenk/homebrew-made) and push |
| 32 | +5. `brew update` to update taps |
| 33 | +6. `brew upgrade` to upgrade formula |
| 34 | + |
| 35 | +## Issues |
| 36 | + |
| 37 | +### `xcrun: error: unable to lookup item 'PlatformPath'` |
| 38 | + |
| 39 | +``` |
| 40 | +xcrun: error: unable to lookup item 'PlatformPath' from command line tools installation |
| 41 | +xcrun: error: unable to lookup item 'PlatformPath' in SDK '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' |
| 42 | +``` |
| 43 | + |
| 44 | +Try fixing the SDK path (yours appears incorrect): |
| 45 | + |
| 46 | +`$ xcrun --show-sdk-path --sdk macosx` |
| 47 | + |
| 48 | +You might have this result: |
| 49 | + |
| 50 | +`/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk` |
| 51 | + |
| 52 | +Switch the default SDK location by invoking: |
| 53 | + |
| 54 | +`$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer` |
| 55 | + |
| 56 | +See also https://stackoverflow.com/a/43418980 |
0 commit comments