From 3e44379f60b766e7bd2bd8d8233e53a25547527a Mon Sep 17 00:00:00 2001 From: Pete Moore Date: Tue, 10 Jan 2017 19:02:50 +0100 Subject: [PATCH] Doc updates, and new release to include both command line tools --- .travis.yml | 3 ++- .travis_rename_releases.sh | 7 +++++-- README.md | 10 ++++------ create-hostname/main.go | 4 ++-- decode-hostname/main.go | 2 +- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index a7c8336..17982d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -58,7 +58,8 @@ deploy: api_key: secure: Cqy5JerPeWGoX2vUVEbNcSePyqDOGrE2U6TWAY98h7dXPk3gkgrFPi/vHKKl08af2Ovu5oag5dNYulzlZ2qVe9s9FD7/TLVALioCy9fkBrgMbBj4ZFtKp4FvcrlwzIakQzevEzXP2bXdKyZEioD36TvpV5RVfw2O6FcI4SnaMzvI8xEm6d0GGgVh+bLKe17Rq8+j0xqR622SZjdgeLN5b6ZKPqU1c/MS8P74rf96vEZBYR/7BfuB8NtaUS7AWL5Fejpy7JEhAxwFst3x3l4KwIs+Y4wyL6LpHXztmwiH+yutrS7sTCyEPqWai++4+fRscvd39nygYpMZ36PnjmCyW4J3F/l+oyiToA6I+I+1CzS9+jZOqMPAUMh5rPHLkG8M1eqHXcI966Ds1v7WGmfaf2wuaaV5JFZo6pUn1xDigh85+SGrfjPeXhV6pDGyA295c88MvvKhcuhjoaq8qKyHKpnYUIsgY1Hr4Q41jgAU2A8XC5y0XNSpOWXIIP9LrVT/lpdVwPYcfCsm3veagmVCLfQX82Y+mH1Sx3hKt89b3euNoMAfYSUBXS1VUylljOhxZn1+W3nzjB77IA50gBVKbgBs7+DiNHJIHYeEa1STX4kEyFXB0pdYnpPkWH8ylPma14rLQoeG/utY2q/VltKiJSxJ+tMr4hRnv5bFFXmGBWo= file: - - "${RELEASE_FILE}" + - "${CREATE_HOSTNAME_RELEASE_FILE}" + - "${DECODE_HOSTNAME_RELEASE_FILE}" on: repo: taskcluster/stateless-dns-go tags: true diff --git a/.travis_rename_releases.sh b/.travis_rename_releases.sh index 12cf939..203c796 100755 --- a/.travis_rename_releases.sh +++ b/.travis_rename_releases.sh @@ -12,6 +12,7 @@ if [ -f "${GOPATH}/bin/create-hostname" ]; then mkdir "${GOPATH}/bin/linux_amd64" mv "${GOPATH}/bin/create-hostname" "${GOPATH}/bin/linux_amd64/create-hostname" + mv "${GOPATH}/bin/decode-hostname" "${GOPATH}/bin/linux_amd64/decode-hostname" fi # linux, darwin: @@ -21,5 +22,7 @@ FILE_EXT="" # let's rename the release file because it has a 1:1 mapping with what it is called on # github releases, and therefore the name for each platform needs to be unique so that # they don't overwrite each other. Set a variable that can be used in .travis.yml -export RELEASE_FILE="${TRAVIS_BUILD_DIR}/create-hostname-${GOOS}-${GOARCH}${FILE_EXT}" -mv "${GOPATH}/bin/${GOOS}_${GOARCH}/create-hostname${FILE_EXT}" "${RELEASE_FILE}" +export CREATE_HOSTNAME_RELEASE_FILE="${TRAVIS_BUILD_DIR}/create-hostname-${GOOS}-${GOARCH}${FILE_EXT}" +export DECODE_HOSTNAME_RELEASE_FILE="${TRAVIS_BUILD_DIR}/decode-hostname-${GOOS}-${GOARCH}${FILE_EXT}" +mv "${GOPATH}/bin/${GOOS}_${GOARCH}/create-hostname${FILE_EXT}" "${CREATE_HOSTNAME_RELEASE_FILE}" +mv "${GOPATH}/bin/${GOOS}_${GOARCH}/decode-hostname${FILE_EXT}" "${DECODE_HOSTNAME_RELEASE_FILE}" diff --git a/README.md b/README.md index f265bd0..e01c79a 100644 --- a/README.md +++ b/README.md @@ -87,8 +87,8 @@ Installing command line tool __Binary installation__ -Download the create-hostname command line tool for your platform from -[here](https://github.com/taskcluster/stateless-dns-go/releases). +Download the create-hostname and/or decode-hostname command line tools for your +platform from [here](https://github.com/taskcluster/stateless-dns-go/releases). __Source installation__ @@ -100,7 +100,7 @@ Requirements: Run: ``` -go get github.com/taskcluster/stateless-dns-go/create-hostname +go get github.com/taskcluster/stateless-dns-go/... ``` Command line usage @@ -123,7 +123,7 @@ Exit Codes: 67: Invalid EXPIRES given 68: Invalid SECRET given -Examples: +Example: $ create-hostname --ip 203.115.35.2 --subdomain foo.com --expires 2016-06-04T16:04:03.739Z --secret 'cheese monkey' znzsgaqaau2hl7h35f4owqn25s76j4h7apm3fe4qpy6pfxjk.foo.com ``` @@ -158,5 +158,3 @@ Testing ```bash go test ./... ``` - -TODO: write tests! diff --git a/create-hostname/main.go b/create-hostname/main.go index e0bfe6c..b8d0f5d 100644 --- a/create-hostname/main.go +++ b/create-hostname/main.go @@ -12,7 +12,7 @@ import ( ) var ( - version = "create-hostname 1.0.2" + version = "create-hostname 1.0.4" usage = ` Usage: create-hostname --ip IP --subdomain SUBDOMAIN --expires EXPIRES --secret SECRET @@ -27,7 +27,7 @@ Exit Codes: 68: Invalid SECRET given 69: Some other problem -Examples: +Example: $ create-hostname --ip 203.115.35.2 --subdomain foo.com --expires 2016-06-04T16:04:03.739Z --secret 'cheese monkey' znzsgaqaau2hl7h35f4owqn25s76j4h7apm3fe4qpy6pfxjk.foo.com ` diff --git a/decode-hostname/main.go b/decode-hostname/main.go index 6a7bfa3..2ee92ac 100644 --- a/decode-hostname/main.go +++ b/decode-hostname/main.go @@ -11,7 +11,7 @@ import ( ) var ( - version = "decode-hostname 1.0.0" + version = "decode-hostname 1.0.4" usage = ` Usage: decode-hostname --fqdn FQDN --subdomain SUBDOMAIN --secret SECRET