mirror of https://github.com/status-im/migrate.git
add version file and --version arg to CLI
This commit is contained in:
parent
37422d109d
commit
c4c955d345
6
main.go
6
main.go
|
@ -18,11 +18,17 @@ import (
|
|||
|
||||
var url = flag.String("url", "", "")
|
||||
var migrationsPath = flag.String("path", "", "")
|
||||
var version = flag.Bool("version", false, "Show migrate version")
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
command := flag.Arg(0)
|
||||
|
||||
if *version {
|
||||
fmt.Printf("%.2f", Version)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
if *migrationsPath == "" {
|
||||
*migrationsPath, _ = os.Getwd()
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
package main
|
||||
|
||||
const Version float64 = 1.1
|
Loading…
Reference in New Issue