Automate tags for release
This commit is contained in:
parent
881c618041
commit
091dc0542c
@ -1,11 +1,9 @@
|
|||||||
# This is an example .goreleaser.yml file with some sensible defaults.
|
|
||||||
# Make sure to check the documentation at https://goreleaser.com
|
|
||||||
before:
|
before:
|
||||||
hooks:
|
hooks:
|
||||||
# You may remove this if you don't use go modules.
|
# tag and push
|
||||||
|
- ./release_tag.pl
|
||||||
|
# clean up/install modules
|
||||||
- go mod tidy
|
- go mod tidy
|
||||||
# you may remove this if you don't need go generate
|
|
||||||
- go generate ./...
|
|
||||||
builds:
|
builds:
|
||||||
- main: cmd/linkwallet/linkwallet.go
|
- main: cmd/linkwallet/linkwallet.go
|
||||||
env:
|
env:
|
||||||
|
14
release_tag.pl
Executable file
14
release_tag.pl
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
open my $fh, "<", "version/version.go" || die "oops";
|
||||||
|
while (my $l = <$fh>) {
|
||||||
|
if ($l =~ m/const Tag = "(.+)"/) {
|
||||||
|
$tag = $1;
|
||||||
|
system ('git', 'tag', '-a', $tag, '-m', "version $tag for release") ;
|
||||||
|
die "could not tag?\n" if $? != 0;
|
||||||
|
system ('git', 'push', 'origin', $tag);
|
||||||
|
die "could not push tag?\n" if $? != 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
die "no version in version/version.go?\n";
|
Loading…
x
Reference in New Issue
Block a user