Add version display and multiarch build

pull/2/head
Jean-Marc MEESSEN 4 years ago
parent 6172f13193
commit b9bb5e8f5e

1
.gitignore vendored

@ -5,6 +5,7 @@
*.so
*.dylib
FLEcli
executables/*
# Test binary, built with `go test -c`
*.test

@ -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 {

@ -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.

@ -0,0 +1,4 @@
package cmd
const VersionString = "v0.0.0 2020-07-11"

@ -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

@ -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
)

Loading…
Cancel
Save