Create a personal access token then configure ghoum with it either via a configuration file or an environment variable.
If you opt to use the configuration file approach, create one that looks something like this:
--- token: "<some-random-40-character-github-token>"
Ghoum by default will look for a configuration file in the current working
.ghoum.yml or if that's missing, in the current user's home
~/.ghoum.yml. If you want to use a different location, you may
do so by specifying the
You may also use environment variables. Ghoum environment variables are prefixed
GHOUM_ so to set the GitHub token you may do so like this:
$ export GHOUM_TOKEN="<some-random-40-character-github-token>"
Create a manifest file using the
init command (defaults to owner):
$ ghoum init INFO attempting to load manifest: ./manifest.yml WARN ./manifest.yml does not exist, will initialize a new one INFO fetch profile of the currently authenticated user (owner) INFO owner profile fetched, set to itskingori INFO get the repositories for user: itskingori INFO initialize manifest file from data fetched from github INFO saved fetched data to ./manifest.yml
You can also add an organization to the manifest (it will merge with owner profile fetched above):
$ ghoum init -o someorg INFO attempting to load manifest: ./manifest.yml INFO was able to load ./manifest.yml successfully INFO fetching profiles of organizations: someorg INFO get the repositories in organization: someorg INFO merge fetched data with what was loaded from ./manifest.yml WARN about to save, will overwrite ./manifest.yml contents INFO saved fetched data to ./manifest.yml
Now that you have a
manifest.yml file, you can make changes to it and apply
them using the
ghoum apply command, or even
ghoum apply -d for a dry-run.
For normal usage the above instructions should do. Below instructions are only necessary if you intend to work on the source code (find contributing guidelines here).
- Fetch the code with
go get -v github.com/itskingori/ghoum.
- Install the Go development tools via
- Install application dependencies via
make dependencies(they'll be placed in
./vendor). Requires golang/dep package manager.
- Build and install the binary with
- Run the command e.g.
./bin/ghoum helpas a basic test.
- Install the Go testing tools via
- Run linter using
make lintand test using
- Create a tag (
git tag) and push the tags to remote (
git push --tags).
- CI pipeline (on Travis CI) will detect the tag and create a
GitHub release here. To note:
- Tags matching
x.y.zwill be marked as final releases.
- Tags matching
x.y.z-*will be marked as pre-releases.
- Tags not matching either of the above, will be ignored and assumed to be normal tags.
- Compressed binary with a shasum 256 text file will be uploaded as attachments to the release.
- Tags matching
- Trigger will start a build on Docker Hub to publish two Docker images (right
after GitHub release):
King'ori J. Maina © 2018. The Apache License 2.0, is a permissive license whose main conditions require preservation of copyright and license notices. Contributors provide an express grant of patent rights. Licensed works, modifications, and larger works may be distributed under different terms and without source code.