A simple command line tool listing GitHub events using RxSwift.
Make sure you have all the prerequisites installed (see below). After that, you can simply clone this repository and build the command line executable (be patient, this will download all the required dependencies and take a while to compile) using
git clone https://github.com/rhx/githubevents.git swift build
After that, you can run the program using
This will display the latest activities for the rhx/githubevents GitHub repositories.
On macOS, you can build the project using Xcode instead. To do this, you need to create an Xcode project first, then open the project in the Xcode IDE:
swift package generate-xcodeproj open githubevents.xcodeproj
After that, select the executable target (not the Bundle/Framework target with the same name as the executable) and use the (usual) Build and Run buttons to build/run your project.
To build, you need Swift 3.1 (download from https://swift.org/download/ -- if you are using macOS, make sure you have the command line tools installed as well). Test that your compiler works using
swift --version, which should give you something like
$ swift --version Apple Swift version 3.1 (swiftlang-802.0.51 clang-802.0.41) Target: x86_64-apple-macosx10.9
on macOS, or on Linux you should get something like:
$ swift --version Swift version 3.1 (swift-3.1-RELEASE) Target: x86_64-unknown-linux-gnu
Here are some common errors you might encounter and how to fix them.
Old Swift toolchain or Xcode
If you get an error such as
$ swift build error: unable to invoke subcommand: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-package (No such file or directory)
this probably means that your Swift toolchain is too old. Make sure the latest toolchain is the one that is found when you run the Swift compiler (see above).
If you get an older version, make sure that the right version of the swift compiler is found first in your
PATH. On macOS, use xcode-select to select and install the latest version, e.g.:
sudo xcode-select -s /Applications/Xcode.app xcode-select --install