Switch to semver, basic test.

This commit is contained in:
2021-06-17 18:47:59 +09:30
parent c47660addf
commit 1812486b19
6 changed files with 54 additions and 3 deletions

View File

@@ -7,12 +7,15 @@ open my $fh, "<", "config/config.go" || die $!;
my $version;
while (<$fh>) {
$version = $1 if /^const\s+CurrentVersion.*?"([\d\.]+)"/;
$version = $1 if /^const\s+CurrentVersion.*?"(v[\d\.]+)"/;
}
close $fh;
die "no version?" unless defined $version;
# quit if tests fail
system("go test ./...") && die "not building release with failing tests";
# so lazy
system "rm", "-rf", "release", "dist";
system "mkdir", "release";