Skip to content

Commit

Permalink
Update workflow for windows builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jomann09 committed Feb 14, 2023
1 parent 8614a99 commit f888547
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
shell: bash

- name: Build Installer
run: build/build_windows.bat
run: build/build_windows.bat ${GITHUB_SHA::6}

- name: Archive Build
uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GOCMD=go
GOTEST=$(GOCMD) test
VERSION?=1.0.0
VERSION?=source
BINARY_NAME=rcagent
DIR_NAME=rcagent-$(VERSION)
VFLAGS=-X github.com/rechecked/rcagent/internal/config.Version=$(VERSION)
Expand Down
4 changes: 2 additions & 2 deletions build/build_windows.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@ECHO OFF

SET version=1.0.0
SET version=%1
SET curpath=%~dp0

:: Install the go-msi package
Expand All @@ -19,7 +19,7 @@ ECHO Path: %curpath%

:: 64bit build process
SET GOARCH=amd64
go build -ldflags "-X github.com/rechecked/rcagent/internal/config.PluginDir=C:\Program Files\rcagent\plugins -X github.com/rechecked/rcagent/internal/config.ConfigDir=C:\Program Files\rcagent\" -o build/bin/rcagent.exe
go build -ldflags "-X 'github.com/rechecked/rcagent/internal/config.PluginDir=C:\Program Files\rcagent\plugins' -X 'github.com/rechecked/rcagent/internal/config.ConfigDir=C:\Program Files\rcagent\' -X 'github.com/rechecked/rcagent/internal/config.Version=%version%'" -o build/bin/rcagent.exe
go-msi make --path build/package/wix.json --msi build/rcagent-install.msi --src build/package/templates --out %curpath%build\tmp --version %version% --arch amd64

:: 32bit build process (if we need later)
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func main() {

// Show version and quit
if *version {
log.Printf("ReChecked Agent, version %s\n", config.Version)
log.Printf("ReChecked Agent, version: %s\n", config.Version)
os.Exit(0)
}

Expand Down

0 comments on commit f888547

Please sign in to comment.