Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
use 'dev' and 'release' build tags for better env-based compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilsaraf committed Apr 16, 2019
1 parent 38b098c commit ea39b6b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -20,4 +20,4 @@ install:
script:
- ./scripts/build.sh
- ./bin/kelp version
- go test --short ./...
- go test -tags dev --short ./...
@@ -1,4 +1,4 @@
// +build debug
// +build dev

package gui

Expand Down
4 changes: 2 additions & 2 deletions scripts/build.sh
Expand Up @@ -85,7 +85,7 @@ then
mkdir -p bin

echo -n "compiling ... "
go build -tags debug -ldflags "$LDFLAGS" -o $OUTFILE
go build -tags dev -ldflags "$LDFLAGS" -o $OUTFILE
BUILD_RESULT=$?
if [[ $BUILD_RESULT -ne 0 ]]
then
Expand Down Expand Up @@ -145,7 +145,7 @@ do
fi

# compile
env GOOS=$GOOS GOARCH=$GOARCH GOARM=$GOARM go build -ldflags "$LDFLAGS" -o $BINARY
env GOOS=$GOOS GOARCH=$GOARCH GOARM=$GOARM go build -tags release -ldflags "$LDFLAGS" -o $BINARY
BUILD_RESULT=$?
if [[ $BUILD_RESULT -ne 0 ]]
then
Expand Down
2 changes: 1 addition & 1 deletion scripts/fs_bin_gen.go
Expand Up @@ -11,7 +11,7 @@ func main() {
fs := http.Dir("./gui/web/build")
e := vfsgen.Generate(fs, vfsgen.Options{
Filename: "./gui/filesystem_vfsdata_release.go",
BuildTags: "!debug",
BuildTags: "release",
PackageName: "gui",
VariableName: "FS",
VariableComment: "file system for GUI as a blob",
Expand Down

0 comments on commit ea39b6b

Please sign in to comment.