Skip to content

Commit

Permalink
Fix version
Browse files Browse the repository at this point in the history
  • Loading branch information
lassejlv committed Jan 9, 2025
1 parent 6bb6490 commit 3900dfb
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
2 changes: 0 additions & 2 deletions .actions
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
hello = echo 'hello_world'

build_win-x64 = GOOS=windows GOARCH=amd64 go build -o build/actionfile-win-x64.exe
build_linux-x64 = GOOS=linux GOARCH=amd64 go build -o build/actionfile-linux-x64
build_linux-arm64 = GOOS=linux GOARCH=arm64 go build -o build/actionfile-linux-arm64
Expand Down
23 changes: 2 additions & 21 deletions utils/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

var ConfigFileName string = ".actions"
var VersionFileName string = "version.txt"
var CurrentVersion string = "0.1.6"

type CommandsArray struct {
Name string
Expand Down Expand Up @@ -58,25 +59,5 @@ func LoadCommands() []CommandsArray {
}

func LoadVersion() string {

fileExists, _ := os.Stat(VersionFileName)

if fileExists == nil {
cwd, err := os.Getwd()

if err != nil {
panic(err)
}

fmt.Println("Could not detect version.txt in ", cwd)
os.Exit(1)
}

data, err := os.ReadFile(VersionFileName)

if err != nil {
panic(err)
}

return string(data)
return CurrentVersion
}
1 change: 0 additions & 1 deletion version.txt

This file was deleted.

0 comments on commit 3900dfb

Please sign in to comment.