mirror of
https://github.com/on4kjm/FLEcli.git
synced 2025-01-18 13:01:09 +01:00
Add version display and multiarch build
This commit is contained in:
parent
6172f13193
commit
b9bb5e8f5e
6 changed files with 24 additions and 12 deletions
1
.gitignore
vendored
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 {
|
||||
|
|
10
cmd/root.go
10
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.
|
||||
|
|
4
cmd/version2.go
Normal file
4
cmd/version2.go
Normal file
|
@ -0,0 +1,4 @@
|
|||
package cmd
|
||||
|
||||
const VersionString = "v0.0.0 2020-07-11"
|
||||
|
16
full_build.sh
Executable file
16
full_build.sh
Executable file
|
@ -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
|
||||
|
3
go.mod
3
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
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue