diff --git a/.gitignore b/.gitignore index 55f22c2..caf9d2c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ *.so *.dylib FLEcli +executables/* # Test binary, built with `go test -c` *.test diff --git a/cmd/inferTime.go b/cmd/inferTime.go index f7595c4..a8d5f0a 100644 --- a/cmd/inferTime.go +++ b/cmd/inferTime.go @@ -103,7 +103,7 @@ func (tb *InferTimeBlock) storeTimeGap(logline LogLine, position int) (bool, err tb.logFilePosition = position } else { // We reached the end of the gap - if tb.lastRecordedTime.IsZero(){ + if tb.lastRecordedTime.IsZero() { return false, errors.New("Gap start time is empty") } if tb.nextValidTime, err = time.Parse(ADIFdateTimeFormat, logline.Date+" "+logline.ActualTime); err != nil { diff --git a/cmd/root.go b/cmd/root.go index d42cb5d..3927763 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -41,15 +41,7 @@ var rootCmd = &cobra.Command{ Use: "FLEcli", Short: "A Command Line \"Fast Log Entry\" (FLE) processor", TraverseChildren: true, - // Long: `A longer description that spans multiple lines and likely contains - // examples and usage of using your application. For example: - - // Cobra is a CLI library for Go that empowers applications. - // This application is a tool to generate the needed files - // to quickly create a Cobra application.`, - // Uncomment the following line if your bare application - // has an action associated with it: - // Run: func(cmd *cobra.Command, args []string) { }, + Version: VersionString, } // Execute adds all child commands to the root command and sets flags appropriately. diff --git a/cmd/version2.go b/cmd/version2.go new file mode 100644 index 0000000..710fa8b --- /dev/null +++ b/cmd/version2.go @@ -0,0 +1,4 @@ +package cmd + +const VersionString = "v0.0.0 2020-07-11" + diff --git a/full_build.sh b/full_build.sh new file mode 100755 index 0000000..4c1f654 --- /dev/null +++ b/full_build.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -e + +go test ./... + +mkdir -p executables/windows +mkdir -p executables/macos +mkdir -p executables/linux + +#Update version + +GOOS=windows GOARCH=386 go build -o executables/windows/FLEcli.exe +GOOS=darwin GOARCH=amd64 go build -o executables/macos/FLEcli +GOOS=linux GOARCH=amd64 go build -o executables/linux/FLEcli-amd64 + diff --git a/go.mod b/go.mod index a1111ea..0c76514 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,6 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.7.0 - golang.org/x/sys v0.0.0-20200523222454-059865788121 // indirect - golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc + golang.org/x/sys v0.0.0-20200523222454-059865788121 // indirect gopkg.in/ini.v1 v1.57.0 // indirect )