From 57fd74f61e68d0edce1343dcf9d40025a7ce0de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20G=C3=A9rczei?= Date: Wed, 13 May 2020 07:26:50 +0200 Subject: [PATCH] added release version override option and tidied the documentation --- Dockerfile | 5 +++-- README.md | 22 +++++++++++++++------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 86f2b8a..54eb060 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ FROM golang:alpine AS buildenv ARG VERSION="0.3.0" +ENV TEA_VERSION="${VERSION}" ARG CGO_ENABLED="0" ARG GOOS="linux" @@ -8,10 +9,10 @@ WORKDIR $GOPATH/src RUN apk add --no-cache git && \ git config --global advice.detachedHead false && \ - git clone --single-branch https://gitea.com/gitea/tea -b v${VERSION} && \ + git clone --single-branch https://gitea.com/gitea/tea -b v${TEA_VERSION} && \ cd tea && \ go get -v . && \ - go build -v -a -ldflags "-X main.Version=$VERSION" -o /tea . + go build -v -a -ldflags "-X main.Version=${TEA_VERSION}" -o /tea . FROM scratch LABEL maintainer="Tamás Gérczei " diff --git a/README.md b/README.md index c4e9d65..4252794 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,19 @@ -# tea: A command line tool to interact with Gitea servers +## tea: A command line tool to interact with Gitea servers -## Build +### Build - docker build . -t gitea/tea:0.3.0 -### Usage -- docker volume create tea -- alias tea='docker run --rm -v tea:/app gitea/tea:0.3.0' -- tea login add -n -u -t -i +...or to build a specific release (see 'https://gitea.com/gitea/tea/releases'): -#### tea stores its configuration in a file named 'tea.yml', which the above will store on a volume named 'tea' so that it might persist +- export VERSION="0.2.0" +- docker build . -t "gitea/tea:${VERSION}" --build-arg VERSION="${VERSION}" + +### Configuration +- docker volume create tea +- alias tea='docker run --rm -v tea:/app gitea/tea:' +- tea login add -n -u -t -i + +### Usage +- tea + +#### tea stores its configuration in a file named 'tea.yml', which the above will store on a volume named 'tea' so that it might persist