* testing

* Fixed versioning string
pull/7/head v0.0.0
Jean-Marc MEESSEN 4 years ago committed by GitHub
parent ec01766a8c
commit c7a694cceb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

1
.gitignore vendored

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

@ -3,7 +3,7 @@
before: before:
hooks: hooks:
# Update the version so that it is included in the app # Update the version so that it is included in the app
- ./update-version.sh #- ./update-version.sh
builds: builds:
- goos: - goos:
- linux - linux
@ -14,6 +14,8 @@ builds:
goarch: 386 goarch: 386
- goos: windows - goos: windows
goarch: amd64 goarch: amd64
ldflags:
- -s -w -X "FLEcli/cmd.VersionString={{.Version}} ({{.ShortCommit}})"
env: env:
- CGO_ENABLED=0 - CGO_ENABLED=0
archives: archives:

BIN
FLEcli

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 cfgFile string
var inputFilename string var inputFilename string
var isInterpolateTime bool var isInterpolateTime bool
var VersionString string
// rootCmd represents the base command when called without any subcommands // rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{ 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…
Cancel
Save