1
0
Fork 0
mirror of https://github.com/on4kjm/FLEcli.git synced 2025-01-18 13:01:09 +01:00

Version2 (#3)

* testing

* Fixed versioning string
This commit is contained in:
Jean-Marc MEESSEN 2020-07-19 10:25:59 +02:00 committed by GitHub
parent ec01766a8c
commit c7a694cceb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 5 additions and 18 deletions

1
.gitignore vendored
View file

@ -6,6 +6,7 @@
*.dylib
./FLEcli
test/output/temp/*
./dist/*
# Test binary, built with `go test -c`
*.test

View file

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

Binary file not shown.

View file

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

View file

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

View file

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