secret-santa/nix/migrate-version.patch

22 lines
589 B
Diff

diff --git a/sql-migrate/config.go b/sql-migrate/config.go
index 6947a53..df394d8 100644
--- a/sql-migrate/config.go
+++ b/sql-migrate/config.go
@@ -6,7 +6,6 @@ import (
"flag"
"fmt"
"os"
- "runtime/debug"
"github.com/go-gorp/gorp/v3"
"gopkg.in/yaml.v2"
@@ -112,8 +111,5 @@ func GetConnection(env *Environment) (*sql.DB, string, error) {
// GetVersion returns the version.
func GetVersion() string {
- if buildInfo, ok := debug.ReadBuildInfo(); ok && buildInfo.Main.Version != "(devel)" {
- return buildInfo.Main.Version
- }
- return "dev"
+ return "@current_version@"
}