1
1
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-11 13:21:00 +02:00

include hash

This commit is contained in:
Zack Scholl 2019-05-03 21:19:04 -06:00
parent cb69e49283
commit bd9c7b5ae9
4 changed files with 9 additions and 7 deletions

View file

@ -4,7 +4,7 @@
src="https://user-images.githubusercontent.com/6550035/46709024-9b23ad00-cbf6-11e8-9fb2-ca8b20b7dbec.jpg" src="https://user-images.githubusercontent.com/6550035/46709024-9b23ad00-cbf6-11e8-9fb2-ca8b20b7dbec.jpg"
width="408px" border="0" alt="croc"> width="408px" border="0" alt="croc">
<br> <br>
<a href="https://github.com/schollz/croc/releases/latest"><img src="https://img.shields.io/badge/version-v4.1.6-brightgreen.svg?style=flat-square" alt="Version"></a> <a href="https://github.com/schollz/croc/releases/latest"><img src="https://img.shields.io/badge/version-v6.0.0-brightgreen.svg?style=flat-square" alt="Version"></a>
<a href="https://travis-ci.org/schollz/croc"><img <a href="https://travis-ci.org/schollz/croc"><img
src="https://img.shields.io/travis/schollz/croc.svg?style=flat-square" alt="Build src="https://img.shields.io/travis/schollz/croc.svg?style=flat-square" alt="Build
Status"></a> Status"></a>

View file

@ -27,7 +27,7 @@ func Run() (err error) {
app := cli.NewApp() app := cli.NewApp()
app.Name = "croc" app.Name = "croc"
if Version == "" { if Version == "" {
Version = "v4.1.6-134-ga651297-a651297" Version = "v6.0.0-cb69e49"
} }
app.Version = Version app.Version = Version
app.Compiled = time.Now() app.Compiled = time.Now()

View file

@ -33,7 +33,7 @@ install_croc()
croc_os="unsupported" croc_os="unsupported"
croc_arch="unknown" croc_arch="unknown"
croc_arm="" croc_arm=""
croc_version="4.1.6" croc_version="6.0.0"
# Termux on Android has $PREFIX set which already ends with /usr # Termux on Android has $PREFIX set which already ends with /usr

View file

@ -15,7 +15,7 @@ func main() {
} }
func run() (err error) { func run() (err error) {
version, err := exec.Command("git", "describe").Output() version, err := exec.Command("git", "describe", "--abbrev=0").Output()
if err != nil { if err != nil {
return return
} }
@ -25,6 +25,8 @@ func run() (err error) {
return return
} }
versionHashNew := strings.TrimSpace(string(versionHash)) versionHashNew := strings.TrimSpace(string(versionHash))
fmt.Println(versionNew)
fmt.Println(versionHashNew)
err = replaceInFile("src/cli/cli.go", `Version = "`, `"`, versionNew+"-"+versionHashNew) err = replaceInFile("src/cli/cli.go", `Version = "`, `"`, versionNew+"-"+versionHashNew)
if err == nil { if err == nil {