AutobahnSwift / Autobahn

CLI tool written in Swift heavily inspired by https://github.com/fastlane/fastlane
MIT License
129 stars 6 forks source link
automation cli fastlane swift swift-library swift-package swift4

Autobahn

Travis status Version Swift 4.0 License Twitter: @kdawgwilk

Autobahn is a set of tools (written in Swift) heavily inspired by fastlane to automate many day to day tasks associated with development of apps in the Apple ecosystem. Currently most progess has been made on a sub package called Shuttle that is basically a port of fastlane's spaceship which is an HTTP client for interacting with the Apple Developer portal and iTunesConnect.

NOTE: This is still a work in progress and there is still much to do, here is a rough list of things I would like to see in the near future

ToDO List:

Usage

$ autobahn drive [highway]

Example Autobahn.swift

enum Highway: String, AutobahnDescription.Highway {
  case build, test, deploy, release
}

Autobahn(Highway.self)

.beforeAll { highway in
  print("Driving highway: \(highway)")
}

.highway(.build) {
  print("Building...")
  try sh("swift", "build")
}

.highway(.test) {
  try sh("swift", "test")
}

.highway(.deploy) {
  print("Deploying...")
}

.highway(.release, dependsOn: [.build, .deploy]) {
  print("Releasing...")
}

.afterAll { highway in
  print("Successfully drove highway: \(highway)")
}

.onError { name, error in
  print("Error driving highway: \(name)")
  print("Error: \(error)")
}

.drive()

Installation

TODO: Not supported quite yet

$ brew tap kdawgwilk/homebrew-tap
$ brew install autobahn

Development

$ git clone https://github.com/kdawgwilk/Autobahn.git
$ cd Autobahn
$ swift build

# You can run the cli from the build dir like this:
# .build/debug/autobahn drive <highway_name>
$ .build/debug/autobahn drive build

# Or I find it helpful to symlink to `/usr/local/bin` so I can run it directly
$ ln -s `pwd`/.build/debug/autobahn /usr/local/bin/autobahn

# autobahn drive <highway_name>
$ autobahn drive build

πŸš€ Contributing

All developers should feel welcome and encouraged to contribute to Autobahn, see our getting started document here to get involved.

πŸ’™ Code of Conduct

Our goal is to create a safe and empowering environment for anyone who decides to use or contribute to Autobahn. Please help us make the community a better place by abiding to this Code of Conduct during your interactions surrounding this project.

This project is in no way affiliated with Apple Inc.