GithubHelp home page GithubHelp logo

swift-yah / heroku-buildpack Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vapor-community/heroku-buildpack

0.0 2.0 0.0 61 KB

Heroku buildpack for Swift

License: BSD 3-Clause "New" or "Revised" License

Shell 100.00%

heroku-buildpack's Introduction

Heroku buildpack: swift

This is a Heroku buildpack for Swift apps that are powered by the Swift Package Manager.

Usage

Example usage:

$ ls
Procfile Package.swift Sources

$ heroku create --buildpack https://github.com/vapor-community/heroku-buildpack.git

$ git push heroku master
remote: -----> Swift app detected
remote: -----> Installing clang 5.0.0
remote: -----> Installing swiftenv
remote: -----> Installing Swift 4.0
remote: -----> Building package
remote: -----> Installing dynamic libraries
remote: -----> Installing binaries

You can also add it to upcoming builds of an existing application:

$ heroku buildpacks:set https://github.com/vapor-community/heroku-buildpack.git

The buildpack will detect your app as Swift if it has a Package.swift file in the root.

Procfile

Using the Procfile, you can set the process to run for your web server. Any binaries built from your Swift source using swift package manager will be placed in your $PATH.

Example Procfile for Vapor 2 apps:

web: Run --env=production --port=$PORT

Specify a Swift version

You can also customise the version of Swift used with a .swift-version file in your repository:

$ cat .swift-version
3.1.1

The .swift-version file is completely compatible with swiftenv.

NOTE: Since there are frequent Swift language changes, it's advised that you pin to your Swift version.

Hooks

You can place custom scripts to be ran before and after compiling your Swift source code inside the following files in your repository:

  • bin/pre_compile
  • bin/post_compile

This is useful if you would need to install any other dependencies.

heroku-buildpack's People

Contributors

kylef avatar loganwright avatar vzsg avatar tanner0101 avatar codegefluester avatar a2 avatar djngoma avatar tiwoc avatar ikenwoo avatar nsomar avatar qpre avatar rcedwards avatar rsmoz avatar takebayashi avatar siemensikkema avatar wbarksdale avatar

Watchers

James Cloos avatar Gustavo Aires avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.