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

Add auto updater #37

Merged
merged 22 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
- name: Set direct proxy
run: go env -w GOPROXY=direct
- run: go install github.com/wailsapp/wails/cmd/wails@latest
- name: Update wails.json
run: node build/updateConfig.js ${{ github.ref_name }} false
- uses: dAppServer/[email protected]
with:
build-name: ${{ matrix.build.name }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ jobs:
- name: Set direct proxy
run: go env -w GOPROXY=direct
- run: go install github.com/wailsapp/wails/cmd/wails@latest
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y.%m.%d')"
- name: Update wails.json
run: node build/updateConfig.js ${{ steps.date.outputs.date }}.${{ github.run_number }} true
- uses: dAppServer/[email protected]
with:
build-name: ${{ matrix.build.name }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
- name: Set direct proxy
run: go env -w GOPROXY=direct
- run: go install github.com/wailsapp/wails/cmd/wails@latest
- name: Update wails.json
run: node build/updateConfig.js 999.999.999 false
- uses: dAppServer/[email protected]
with:
build-name: ${{ matrix.build.name }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ coverage
bower_components
.lock-wscript
build/Release
build/bin
build/installer
wailsjs/
package.json.md5
node_modules/
Expand Down
20 changes: 20 additions & 0 deletions build/updateConfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const fs = require('fs');
const fileName = 'wails.json';
const file = require("../" + fileName);

console.log("changing version to " + process.argv[2] + ", isNightly to " + process.argv[3] + " and environment to prod")

const versionNum = `${process.argv[2]}`.replace("v", "")
file.version = versionNum;
file.info.productVersion = versionNum;
file.isNightly = process.argv[3] === 'true';
file.environment = "prod"

if(process.argv[2] === undefined || process.argv[2] === "" || process.argv[3] === undefined || process.argv[3] === "") {
throw new Error("version and isNightly must be set")
}

fs.writeFile(fileName, JSON.stringify(file), function writeJSON(err) {
if (err) return console.log(err);
console.log(JSON.stringify(file, null, 2));
});
108 changes: 0 additions & 108 deletions build/windows/installer/project.nsi

This file was deleted.

179 changes: 0 additions & 179 deletions build/windows/installer/wails_tools.nsh

This file was deleted.

6 changes: 5 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@ go 1.18

require (
github.com/adrg/xdg v0.4.0
github.com/hashicorp/go-version v1.6.0
github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf
github.com/gorcon/rcon v1.3.4
github.com/jensvandewiel/gosteamcmd v0.1.2
github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19
github.com/sethvargo/go-password v0.2.0
github.com/sqweek/dialog v0.0.0-20220809060634-e981b270ebbf
github.com/wailsapp/wails/v2 v2.6.0
golang.org/x/sys v0.13.0
)

require (
github.com/TheTitanrain/w32 v0.0.0-20180517000239-4f5cfb03fabf // indirect
github.com/UserExistsError/conpty v0.1.1 // indirect
github.com/bep/debounce v1.2.1 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
Expand All @@ -36,7 +41,6 @@ require (
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
)

Expand Down
Loading
Loading