mirror of https://github.com/schollz/croc.git
get version from env varaible
This commit is contained in:
parent
900424ca66
commit
11efb6be5e
|
@ -3,6 +3,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
)
|
||||
|
@ -15,11 +16,7 @@ func main() {
|
|||
}
|
||||
|
||||
func run() (err error) {
|
||||
version, err := exec.Command("git", "describe", "--abbrev=0").Output()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
versionNew := strings.TrimSpace(string(version))
|
||||
versionNew := os.Getenv("VERSION")
|
||||
versionHash, err := exec.Command("git", "rev-parse", "--short", "HEAD").Output()
|
||||
if err != nil {
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue