Automate tags for release

This commit is contained in:
2022-05-24 18:23:57 +09:30
parent 881c618041
commit 091dc0542c
2 changed files with 17 additions and 5 deletions

14
release_tag.pl Executable file
View 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";