Skip to content

Commit 0cfa6a0

Browse files
committedJun 21, 2023
remove msi installer #265
1 parent e6f3b40 commit 0cfa6a0

File tree

7 files changed

+10
-224
lines changed

7 files changed

+10
-224
lines changed
 

‎.github/workflows/frontends.yml

+3-49
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
id: set-version
3838
run: echo "version=${GITHUB_REF#refs/*/}" >> ${GITHUB_OUTPUT}
3939

40-
build-windows-bin:
40+
build-windows:
4141
needs:
4242
- set-version
4343
runs-on: ubuntu-22.04
@@ -75,45 +75,11 @@ jobs:
7575
path: bin/windows-client
7676
if-no-files-found: error
7777

78-
- name: upload new windows-installer
79-
uses: actions/upload-artifact@v2
80-
with:
81-
name: new-windows-installer${{ matrix.output-suffix }}
82-
path: packaging/windows/naisdevice.exe
83-
if-no-files-found: error
84-
85-
build-windows:
86-
strategy:
87-
matrix:
88-
output-suffix: ["", "-tenant"]
89-
needs:
90-
- build-windows-bin
91-
runs-on: windows-latest
92-
steps:
93-
- uses: actions/checkout@v3
94-
- uses: actions/setup-go@v2
95-
with:
96-
go-version: ${{ env.go_version }}
97-
- name: Add msbuild to PATH
98-
uses: microsoft/setup-msbuild@v1
99-
- name: download windows binaries
100-
uses: actions/download-artifact@v3
101-
with:
102-
name: windows-client${{ matrix.output-suffix }}
103-
path: bin/windows
104-
- name: set version env var
105-
run: |
106-
$version = 800+[int]$Env:GITHUB_RUN_NUMBER
107-
"WINDOWS_BUILD_NUMBER=$version" >> $Env:GITHUB_ENV
108-
- name: create windows installer
109-
run: |
110-
msbuild packaging\windows\naisdevice.wixproj
111-
md5sum bin/windows/naisdevice.msi
112-
- name: upload windows installer
78+
- name: upload windows-installer
11379
uses: actions/upload-artifact@v2
11480
with:
11581
name: windows-installer${{ matrix.output-suffix }}
116-
path: bin/windows/naisdevice.msi
82+
path: packaging/windows/naisdevice.exe
11783
if-no-files-found: error
11884

11985
build-macos:
@@ -228,18 +194,6 @@ jobs:
228194
uses: actions/download-artifact@v3
229195
with:
230196
name: windows-installer${{ matrix.output-suffix }}
231-
- name: upload naisdevice.msi
232-
uses: actions/upload-release-asset@v1
233-
with:
234-
upload_url: ${{ needs.new_release.outputs.upload_url }}
235-
asset_path: ./naisdevice.msi
236-
asset_name: naisdevice${{ matrix.output-suffix }}.msi
237-
asset_content_type: application/octet-stream
238-
239-
- name: download new windows installer
240-
uses: actions/download-artifact@v3
241-
with:
242-
name: new-windows-installer${{ matrix.output-suffix }}
243197
- name: Calculate checksum
244198
run: |
245199
sha256sum naisdevice.exe | awk {'print $1}' > naisdevice.exe.sha256

‎Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ macos-client:
5353
# Run by GitHub actions on linux
5454
windows-client:
5555
mkdir -p ./bin/windows-client
56-
go install github.com/akavel/rsrc@latest
57-
${GOPATH}/bin/rsrc -arch amd64 -manifest ./packaging/windows/admin_manifest.xml -ico assets/nais-logo-blue.ico -o ./cmd/helper/main_windows.syso
58-
${GOPATH}/bin/rsrc -ico assets/nais-logo-blue.ico -o ./cmd/device-agent/main_windows.syso
56+
57+
go run github.com/akavel/rsrc -arch amd64 -manifest ./packaging/windows/admin_manifest.xml -ico assets/nais-logo-blue.ico -o ./cmd/helper/main_windows.syso
58+
go run github.com/akavel/rsrc -ico assets/nais-logo-blue.ico -o ./cmd/device-agent/main_windows.syso
5959
GOOS=windows GOARCH=amd64 go build -o bin/windows-client/naisdevice-systray.exe --tags "$(GOTAGS)" -ldflags "-s $(LDFLAGS) -H=windowsgui" ./cmd/systray
6060
./packaging/windows/sign-exe bin/windows-client/naisdevice-systray.exe ./packaging/windows/naisdevice.crt ./packaging/windows/naisdevice.key
6161
GOOS=windows GOARCH=amd64 go build -o bin/windows-client/naisdevice-agent.exe --tags "$(GOTAGS)" -ldflags "-s $(LDFLAGS) -H=windowsgui" ./cmd/device-agent

‎go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ require (
105105
require (
106106
cloud.google.com/go/compute/metadata v0.2.3 // indirect
107107
github.com/BurntSushi/toml v1.2.1 // indirect
108+
github.com/akavel/rsrc v0.10.2 // indirect
108109
github.com/chigopher/pathlib v0.15.0 // indirect
109110
github.com/fsnotify/fsnotify v1.6.0 // indirect
110111
github.com/go-logr/logr v1.2.3 // indirect

‎go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,8 @@ github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm
621621
github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk=
622622
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
623623
github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM=
624+
github.com/akavel/rsrc v0.10.2 h1:Zxm8V5eI1hW4gGaYsJQUhxpjkENuG91ki8B4zCrvEsw=
625+
github.com/akavel/rsrc v0.10.2/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c=
624626
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
625627
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
626628
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=

‎packaging/windows/naisdevice.wixproj

-26
This file was deleted.

‎packaging/windows/naisdevice.wxs

-146
This file was deleted.

‎tools.go

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package tools
55

66
import (
7+
_ "github.com/akavel/rsrc"
78
_ "github.com/vektra/mockery/v2"
89
_ "golang.org/x/vuln/cmd/govulncheck"
910
_ "google.golang.org/grpc/cmd/protoc-gen-go-grpc"

0 commit comments

Comments
 (0)
Please sign in to comment.