From 56f9ae312b5bf29a5eff459adf50582645387411 Mon Sep 17 00:00:00 2001 From: Camilo Aguilar Date: Mon, 5 Jan 2015 11:47:39 -0500 Subject: [PATCH] Documents supported environment variables --- README.md | 26 +++++++++++++++++++------- main.go | 9 +++++++++ 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2cafe51..d78d39e 100644 --- a/README.md +++ b/README.md @@ -6,25 +6,37 @@ Yet another Github release command line tool. This one, though, is much more min Github command line release tool. Usage: - github-release + github-release Parameters: - : Github user and repository - : Used to created the release. It is also used as the release's name - : Reference from where to create the provided , if it does not exist - : The release description - : Glob pattern describing the list of files to include in the release + : Github user and repository + : Used to created the release. It is also used as the release's name + : Reference from where to create the provided , if it does not exist + : The release description + : Glob pattern describing the list of files to include in the release Options: - -version: Displays version + -version: Displays version + +Environment variables: + DEBUG: Allows you to run github-release in debugging mode. DO NOT do this if you are attempting to upload big files. + GITHUB_TOKEN: Must be set in order to interact with Github's API + GITHUB_USER: Just in case you want an alternative way of providing your github user + GITHUB_REPO: Just in case you want an alternative way of providing your github repo + GITHUB_API: Github API endpoint. Set to https://api.github.com/repos/:github-user/:github-repo" by default Before using this tool make sure you set the environment variable GITHUB_TOKEN with a valid Github token and correct authorization scopes to allow you to create releases in your project. For more information about creating Github tokens please read the official Github documentation at https://help.github.com/articles/creating-an-access-token-for-command-line-use/ + +Author: https://github.com/c4milo +License: http://mozilla.org/MPL/2.0/ + ``` ### Examples Feel free to inspect this project's [Makefile](https://github.com/c4milo/github-release/blob/master/Makefile) for an example on how this tool can be used to create releases like this: ![](https://cldup.com/lTTZG_KQXI.png) + \ No newline at end of file diff --git a/main.go b/main.go index 90c4e2e..0d4d5e1 100644 --- a/main.go +++ b/main.go @@ -71,11 +71,20 @@ Parameters: Options: -version: Displays version +Environment variables: + DEBUG: Allows you to run github-release in debugging mode. DO NOT do this if you are attempting to upload big files. + GITHUB_TOKEN: Must be set in order to interact with Github's API + GITHUB_USER: Just in case you want an alternative way of providing your github user + GITHUB_REPO: Just in case you want an alternative way of providing your github repo + GITHUB_API: Github API endpoint. Set to https://api.github.com/repos/:github-user/:github-repo" by default + Before using this tool make sure you set the environment variable GITHUB_TOKEN with a valid Github token and correct authorization scopes to allow you to create releases in your project. For more information about creating Github tokens please read the official Github documentation at https://help.github.com/articles/creating-an-access-token-for-command-line-use/ +Author: https://github.com/c4milo +License: http://mozilla.org/MPL/2.0/ ` func main() {