├── .profile.d └── swift.sh ├── LICENSE ├── README.md └── bin ├── compile ├── detect └── release /.profile.d/swift.sh: -------------------------------------------------------------------------------- 1 | export PATH=$PATH:/app/vendor/swift/usr/bin -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Boris Bügling 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Heroku buildpack for Swift 2 | 3 | [![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/) 4 | 5 | A simple Swift buildpack, uses the official Ubuntu LTS build 6 | from the [Swift website][1]. 7 | 8 | ## Usage 9 | 10 | Create a new app using the buildpack: 11 | 12 | ```bash 13 | $ heroku create -b https://github.com/neonichu/swift-buildpack.git 14 | ``` 15 | 16 | or add it to an existing app: 17 | 18 | ```bash 19 | $ heroku config:add BUILDPACK_URL=https://github.com/neonichu/swift-buildpack.git 20 | ``` 21 | 22 | All the Swift binaries are installed into `vendor/swift` and are 23 | available via `PATH`. 24 | 25 | ## Example 26 | 27 | This [script][2] might work as an example. 28 | 29 | 30 | [1]: https://swift.org 31 | [2]: https://gist.github.com/neonichu/c504267a23ca3f3126bb 32 | -------------------------------------------------------------------------------- /bin/compile: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | NAME=swift-2.2-SNAPSHOT-2015-12-01-b 4 | 5 | echo "-----> Installing $NAME" 6 | cd $1 7 | curl https://swift.org/builds/ubuntu1404/$NAME/$NAME-ubuntu14.04.tar.gz -s -O 8 | mkdir -p vendor/swift 9 | tar -C vendor/swift -xvf $NAME-ubuntu14.04.tar.gz 10 | mv vendor/swift/$NAME-ubuntu14.04/* vendor/swift 11 | 12 | rmdir vendor/swift/$NAME-ubuntu14.04 13 | rm -f $NAME-ubuntu14.04.tar.gz 14 | 15 | LP_DIR=`cd $(dirname $0); cd ..; pwd` 16 | mkdir -p .profile.d 17 | cp -n ${LP_DIR}/.profile.d/* .profile.d/ 18 | -------------------------------------------------------------------------------- /bin/detect: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "Swift 2.2" 4 | exit 0 5 | -------------------------------------------------------------------------------- /bin/release: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cat <