mirror of
https://github.com/on4kjm/FLEcli.git
synced 2025-01-18 13:01:09 +01:00
parent
ec01766a8c
commit
c7a694cceb
6 changed files with 5 additions and 18 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,6 +6,7 @@
|
|||
*.dylib
|
||||
./FLEcli
|
||||
test/output/temp/*
|
||||
./dist/*
|
||||
|
||||
# Test binary, built with `go test -c`
|
||||
*.test
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
before:
|
||||
hooks:
|
||||
# Update the version so that it is included in the app
|
||||
- ./update-version.sh
|
||||
#- ./update-version.sh
|
||||
builds:
|
||||
- goos:
|
||||
- linux
|
||||
|
@ -14,6 +14,8 @@ builds:
|
|||
goarch: 386
|
||||
- goos: windows
|
||||
goarch: amd64
|
||||
ldflags:
|
||||
- -s -w -X "FLEcli/cmd.VersionString={{.Version}} ({{.ShortCommit}})"
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
archives:
|
||||
|
|
BIN
FLEcli
Executable file
BIN
FLEcli
Executable file
Binary file not shown.
|
@ -1,4 +0,0 @@
|
|||
package cmd
|
||||
|
||||
//VersionString is the version that will be displayed with the -v switch
|
||||
const VersionString = "v0.0.0-1-gb4c7401 (2020-07-18)"
|
|
@ -35,6 +35,7 @@ import (
|
|||
var cfgFile string
|
||||
var inputFilename string
|
||||
var isInterpolateTime bool
|
||||
var VersionString string
|
||||
|
||||
// rootCmd represents the base command when called without any subcommands
|
||||
var rootCmd = &cobra.Command{
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
VERSION_FROM_GIT=$(git describe --tags)
|
||||
BUILD_TIME=$(date +%F)
|
||||
|
||||
echo "Building version ${VERSION_FROM_GIT}"
|
||||
|
||||
echo "package cmd" > cmd/FLEcli_version.go
|
||||
echo " " >> cmd/FLEcli_version.go
|
||||
echo "//VersionString is the version that will be displayed with the -v switch" >> cmd/FLEcli_version.go
|
||||
echo "const VersionString = \"${VERSION_FROM_GIT} (${BUILD_TIME})\"" >> cmd/FLEcli_version.go
|
Loading…
Reference in a new issue