From 11c8f1111c3f74ccc6bd4a3901f0eb447616f827 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Mon, 4 May 2020 18:01:23 +0200 Subject: Build releases with goreleaser --- .goreleaser.yml | 33 +++++++++++++++++++++++++++++++++ main.go | 2 +- pkg/version/version.go | 15 +++++++++++---- 3 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 .goreleaser.yml diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..51ffd0d --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,33 @@ +project_name: feed2imap-go + +before: + hooks: + - go mod download +builds: + - + binary: feed2imap-go + ldflags: + - -s -w -X github.com/Necoro/feed2imap-go/pkg/version.version={{.Version}} -X github.com/Necoro/feed2imap-go/pkg/version.commit={{.ShortCommit}} + goos: + - windows + - linux + - darwin + goarch: + - amd64 +archives: + - + replacements: + amd64: x86_64 + 386: x86_32 + + format: tar.gz + format_overrides: + - goos: windows + format: zip + files: + - LICENSE + - README.md + - config.yml.example + +changelog: + skip: true diff --git a/main.go b/main.go index b959076..4dce1b7 100644 --- a/main.go +++ b/main.go @@ -52,7 +52,7 @@ func processFeed(feed *feed.Feed, client *imap.Client, dryRun bool) { func run() error { flag.Parse() if *printVersion { - println("Feed2Imap-Go, version " + version.Version()) + println("Feed2Imap-Go, " + version.FullVersion()) return nil } diff --git a/pkg/version/version.go b/pkg/version/version.go index 5e224a6..eabf583 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -1,11 +1,18 @@ package version -// the way via debug.BuildInfo does not work -- it'll always return "devel" -// thus the oldschool way: hardcoded +// this is set by the linker during build +var ( + version = "devel" + commit = "" -const version = "0.2.0-devel" +) -// Current feed2imap version +// Version returns the current feed2imap-go version func Version() string { return version } + +// FullVersion returns the version including the commit hash +func FullVersion() string { + return "Version " + version + " Commit: " + commit +} \ No newline at end of file -- cgit v1.2.3-70-g09d2 ef='/portato.git/log/portato/gui?h=flagrw&follow=1'>gui/templates/UpdateWindow.ui (unfollow)
Commit message (Expand)AuthorFilesLines
2010-04-23Enable debugging for this branchRené 'Necoro' Neumann1-2/+2
2010-04-23new version plugin showed the versions in the wrong orderRené 'Necoro' Neumann1-1/+1
2010-04-23Clearer debug message for packages not in mergequeueRené 'Necoro' Neumann1-1/+1
2010-04-23Reset HOME to /root for rootRené 'Necoro' Neumann1-0/+4
2010-04-23Small error in sqldbRené 'Necoro' Neumann1-1/+1
2010-04-22Updated french translation to current translation status.Clement Bourgeois1-77/+84
2010-04-19Typo in TRANSLATORSRené 'Necoro' Neumann1-1/+1
2010-04-19Updated portguese translationAlberto Federman Neto1-348/+469
2010-04-19Remove unused pythonic eix parser implementationRené 'Necoro' Neumann1-416/+0
2010-04-19Connect the accels from the menu.René 'Necoro' Neumann1-12/+16
2010-04-19Replace 'Portage Warning' by 'External Warning'René 'Necoro' Neumann1-1/+1
2010-04-17Updated italian translation. Thx to PonsiRené 'Necoro' Neumann1-314/+369
2010-04-16Fix gtk deprecation warningRené 'Necoro' Neumann1-1/+1
2010-04-16TypoRené 'Necoro' Neumann2-3/+3
2010-04-16Do not allow portage's sqlite backend for the moment ... bug #564292René 'Necoro' Neumann2-16/+25
2010-04-15Better sorting of the database types in the preferences.René 'Necoro' Neumann2-6/+6
2010-04-15Add notify-python dependency for the version checkerRené 'Necoro' Neumann1-1/+1
2010-04-15Make the database type choice an info messageRené 'Necoro' Neumann2-7/+13
2010-04-15Renamed es_ES to esRené 'Necoro' Neumann1-0/+0
2010-04-15Fixed dependancy of the new_version plugin from "dev-util/git" to "dev-vcs/gi...Clement Bourgeois1-1/+1
2010-04-14Make some useless info messages being debug statementsRené 'Necoro' Neumann2-34/+17
2010-04-14Improve the C modulesRené 'Necoro' Neumann3-37/+52
2010-04-14Small modifications made to the French translation (typos, grammar).Clement Bourgeois1-69/+69
2010-04-14Fixed the unicode support and stuff ... and also made eix faster :)René 'Necoro' Neumann1-20/+22
2010-04-14Disable debug messages by defaultRené 'Necoro' Neumann1-1/+1
2010-04-13Better eix error inheritance and handlingRené 'Necoro' Neumann1-2/+9
2010-04-13Fix the handling of FilterSets. Fixes bug #558887.René 'Necoro' Neumann2-56/+64
2010-04-12Updated newsRené 'Necoro' Neumann1-0/+1
2010-04-13Added my name to translators list.Clement Bourgeois1-0/+1