From 4b6c73ff49a667ff865a129faee3f362fd56302b Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Fri, 7 Aug 2020 15:44:47 +0200 Subject: [PATCH] Move to go modules Signed-off-by: Knut Ahlers --- Makefile | 2 +- go.mod | 10 ++++++++++ go.sum | 22 ++++++++++++++++++++++ main.go | 4 +++- 4 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 go.mod create mode 100644 go.sum diff --git a/Makefile b/Makefile index 8c0ab19..f37eba9 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,6 @@ integration: install cd integration && make all install: test - go install -a -ldflags="-X main.version=$(shell git describe --tags)" + go install -a -ldflags="-X main.version=$(shell git describe --tags)" -mod=readonly .PHONY: integration diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..4bb3f7d --- /dev/null +++ b/go.mod @@ -0,0 +1,10 @@ +module github.com/Luzifer/git-changerelease + +go 1.14 + +require ( + github.com/Luzifer/rconfig/v2 v2.2.1 + github.com/mitchellh/go-homedir v1.1.0 + github.com/sirupsen/logrus v1.6.0 + gopkg.in/yaml.v2 v2.3.0 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..4ca7d7f --- /dev/null +++ b/go.sum @@ -0,0 +1,22 @@ +github.com/Luzifer/rconfig v1.2.0 h1:waD1sqasGVSQSrExpLrQ9Q1JmMaltrS391VdOjWXP/I= +github.com/Luzifer/rconfig/v2 v2.2.1 h1:zcDdLQlnlzwcBJ8E0WFzOkQE1pCMn3EbX0dFYkeTczg= +github.com/Luzifer/rconfig/v2 v2.2.1/go.mod h1:OKIX0/JRZrPJ/ZXXWklQEFXA6tBfWaljZbW37w+sqBw= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/validator.v2 v2.0.0-20180514200540-135c24b11c19 h1:WB265cn5OpO+hK3pikC9hpP1zI/KTwmyMFKloW9eOVc= +gopkg.in/validator.v2 v2.0.0-20180514200540-135c24b11c19/go.mod h1:o4V0GXN9/CAmCsvJ0oXYZvrZOe7syiDZSN1GWGZTGzc= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/main.go b/main.go index ae2af08..c64c2db 100644 --- a/main.go +++ b/main.go @@ -14,9 +14,10 @@ import ( "text/template" "time" - "github.com/Luzifer/rconfig" "github.com/mitchellh/go-homedir" log "github.com/sirupsen/logrus" + + "github.com/Luzifer/rconfig/v2" ) var ( @@ -42,6 +43,7 @@ var ( func prepareRun() { var err error + rconfig.AutoEnv(true) if err = rconfig.Parse(&cfg); err != nil { log.WithError(err).Fatal("Unable to parse commandline options") }