Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.2.0 #17

Merged
merged 18 commits into from
Aug 2, 2024
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
71 changes: 36 additions & 35 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ jobs:
fail-fast: false
matrix:
include:
- language: go
build-mode: manual
- language: go
build-mode: manual
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
Expand All @@ -55,40 +55,41 @@ jobs:
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
go build -o build/server/server.exe server
go build -o build/server/genCert.exe genCert
go build -o build/launcher/launcher.exe launcher
go build -o build/launcher/watcher.exe watcher
go build -o build/launcher/config.exe config
go build -o build/launcher/config-admin.exe admin
go build -o build/launcher/config-admin-agent.exe agent
# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
mv go.work.example go.work
go build -o build/server/server.exe ./server
go build -o build/server/bin/genCert.exe ./server-genCert
go build -o build/launcher/launcher.exe ./launcher
go build -o build/launcher/agent.exe ./launcher-agent
go build -o build/launcher/bin/config.exe ./launcher-config
go build -o build/launcher/bin/config-admin.exe ./launcher-config-admin
go build -o build/launcher/bin/config-admin-agent.exe ./launcher-config-admin-agent

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
server-genCert/go.sum
launcher/go.sum
launcher-common/go.sum
launcher-watcher/go.sum
launcher-agent/go.sum
launcher-config/go.sum
launcher-config-admin/go.sum
launcher-config-admin-agent/go.sum
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
go.work
go.work.sum
.env
.idea/
dist/
Expand Down
155 changes: 70 additions & 85 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ builds:
goarch: [ arm64 ]
- id: server-genCert
main: ./server-genCert
binary: genCert
binary: bin/genCert
goos:
- linux
- windows
Expand All @@ -36,109 +36,119 @@ builds:
- amd64
- arm
- arm64
- id: server-win_x86-32_arch
main: ./server
binary: server_x86-32
goos: [ windows ]
goarch: [ "386" ]
- id: server-win_x86-64_arch
main: ./server
binary: server_x86-64
goos: [ windows ]
goarch: [ amd64 ]
- id: server-win_arm32_arch
main: ./server
binary: server_arm32
goos: [ windows ]
goarch: [ arm ]
- id: server-win_arm64_arch
main: ./server
binary: server_arm64
goos: [ windows ]
goarch: [ arm64 ]
- id: server-genCert-win_x86-32_arch
main: ./server-genCert
binary: genCert_x86-32
goos: [ windows ]
goarch: [ "386" ]
- id: server-genCert-win_x86-64_arch
main: ./server-genCert
binary: genCert_x86-64
goos: [ windows ]
goarch: [ amd64 ]
- id: server-genCert-win_arm32_arch
main: ./server-genCert
binary: genCert_arm32
goos: [ windows ]
goarch: [ arm ]
- id: server-genCert-win_arm64_arch
main: ./server-genCert
binary: genCert_arm64
goos: [ windows ]
goarch: [ arm64 ]
- id: server-genCert-win_x86-64
main: ./server-genCert
binary: server/genCert
binary: server/bin/genCert
goos: [ windows ]
goarch: [ amd64 ]
- id: server-genCert-win_arm64
main: ./server-genCert
binary: server/genCert
binary: server/bin/genCert
goos: [ windows ]
goarch: [ arm64 ]
- id: launcher-win_x86-64
main: ./launcher
binary: launcher/launcher
goos: [ windows ]
goarch: [ amd64 ]
- id: launcher-watcher-win_x86-64
main: ./launcher-watcher
binary: launcher/watcher
- id: launcher-agent-win_x86-64
main: ./launcher-agent
binary: launcher/bin/agent
goos: [ windows ]
goarch: [ amd64 ]
- id: launcher-config-win_x86-64
main: ./launcher-config
binary: launcher/config
binary: launcher/bin/config
goos: [ windows ]
goarch: [ amd64 ]
- id: launcher-config-admin-win_x86-64
main: ./launcher-config-admin
binary: launcher/config-admin
binary: launcher/bin/config-admin
goos: [ windows ]
goarch: [ amd64 ]
- id: launcher-config-admin-agent-win_x86-64
main: ./launcher-config-admin-agent
binary: launcher/config-admin-agent
binary: launcher/bin/config-admin-agent
goos: [ windows ]
goarch: [ amd64 ]
- id: launcher-win_arm64
main: ./launcher
binary: launcher/launcher
goos: [ windows ]
goarch: [ arm64 ]
- id: launcher-watcher-win_arm64
main: ./launcher-watcher
binary: launcher/watcher
- id: launcher-agent-win_arm64
main: ./launcher-agent
binary: launcher/bin/agent
goos: [ windows ]
goarch: [ arm64 ]
- id: launcher-config-win_arm64
main: ./launcher-config
binary: launcher/config
binary: launcher/bin/config
goos: [ windows ]
goarch: [ arm64 ]
- id: launcher-config-admin-win_arm64
main: ./launcher-config-admin
binary: launcher/config-admin
binary: launcher/bin/config-admin
goos: [ windows ]
goarch: [ arm64 ]
- id: launcher-config-admin-agent-win_arm64
main: ./launcher-config-admin-agent
binary: launcher/config-admin-agent
binary: launcher/bin/config-admin-agent
goos: [ windows ]
goarch: [ arm64 ]
- id: launcher_launcher-win-x86-64
main: ./launcher
binary: launcher
goos: [ windows ]
goarch: [ amd64 ]
- id: launcher-agent_launcher-win-x86-64
main: ./launcher-agent
binary: bin/agent
goos: [ windows ]
goarch: [ amd64 ]
- id: launcher-config_launcher-win-x86-64
main: ./launcher-config
binary: bin/config
goos: [ windows ]
goarch: [ amd64 ]
- id: launcher-config-admin_launcher-win-x86-64
main: ./launcher-config-admin
binary: bin/config-admin
goos: [ windows ]
goarch: [ amd64 ]
- id: launcher-config-admin-agent_launcher-win-x86-64
main: ./launcher-config-admin-agent
binary: bin/config-admin-agent
goos: [ windows ]
goarch: [ amd64 ]
- id: launcher_launcher-win-arm64
main: ./launcher
binary: launcher
goos: [ windows ]
goarch: [ arm64 ]
- id: launcher-agent_launcher-win-arm64
main: ./launcher-agent
binary: bin/agent
goos: [ windows ]
goarch: [ arm64 ]
- id: launcher-config_launcher-win-arm64
main: ./launcher-config
binary: bin/config
goos: [ windows ]
goarch: [ arm64 ]
- id: launcher-config-admin_launcher-win-arm64
main: ./launcher-config-admin
binary: bin/config-admin
goos: [ windows ]
goarch: [ arm64 ]
- id: launcher-config-admin-agent_launcher-win-arm64
main: ./launcher-config-admin-agent
binary: bin/config-admin-agent
goos: [ windows ]
goarch: [ arm64 ]
archives:
- id: all_x86-64
builds: [ server-win_x86-64, server-genCert-win_x86-64, launcher-win_x86-64, launcher-watcher-win_x86-64, launcher-config-win_x86-64, launcher-config-admin-win_x86-64, launcher-config-admin-agent-win_x86-64 ]
builds: [ server-win_x86-64, server-genCert-win_x86-64, launcher-win_x86-64, launcher-agent-win_x86-64, launcher-config-win_x86-64, launcher-config-admin-win_x86-64, launcher-config-admin-agent-win_x86-64 ]
format: zip
name_template: >-
{{- .ProjectName }}_
Expand All @@ -160,7 +170,7 @@ archives:
- src: launcher-config/windows-resources/*
dst: launcher/
- id: all_arm64
builds: [ server-win_arm64, server-genCert-win_arm64, launcher-win_arm64, launcher-watcher-win_arm64, launcher-config-win_arm64, launcher-config-admin-win_arm64, launcher-config-admin-agent-win_arm64 ]
builds: [ server-win_arm64, server-genCert-win_arm64, launcher-win_arm64, launcher-agent-win_arm64, launcher-config-win_arm64, launcher-config-admin-win_arm64, launcher-config-admin-agent-win_arm64 ]
format: zip
name_template: >-
{{- .ProjectName }}_
Expand Down Expand Up @@ -213,31 +223,8 @@ archives:
format_overrides:
- goos: windows
format: zip
- id: server-server-genCert-win
name_template: "{{ .ProjectName }}_server_{{ .RawVersion }}_win_all"
meta: true
files:
- src: dist/server-win_*_arch*/*
dst: bin/server
strip_parent: true
- src: dist/server-genCert-win_*_arch*/*
dst: bin/genCert
strip_parent: true
- src: server/resources/config
dst: resources/config
- src: server/resources/responses
dst: resources/responses
- src: LICENSE
dst: docs/LICENSE.txt
- src: README.md
dst: docs/README.txt
- src: server/windows-resources/runner.bat
dst: server.bat
- src: server-genCert/windows-resources/runner.bat
dst: genCert.bat
format: zip
- id: launcher-win_x86-64
builds: [ launcher-win_x86-64, launcher-watcher-win_x86-64, launcher-config-win_x86-64, launcher-config-admin-win_x86-64, launcher-config-admin-agent-win_x86-64 ]
builds: [ launcher_launcher-win-x86-64, launcher-agent_launcher-win-x86-64, launcher-config_launcher-win-x86-64, launcher-config-admin_launcher-win-x86-64, launcher-config-admin-agent_launcher-win-x86-64 ]
files:
- src: launcher/resources
dst: resources
Expand All @@ -253,9 +240,8 @@ archives:
{{- .ProjectName }}_launcher_
{{- .RawVersion }}_win_x86-64
format: zip
strip_binary_directory: true
- id: launcher-win_arm64
builds: [ launcher-win_arm64, launcher-watcher-win_arm64, launcher-config-win_arm64, launcher-config-admin-win_arm64, launcher-config-admin-agent-win_arm64 ]
builds: [ launcher_launcher-win-arm64, launcher-agent_launcher-win-arm64, launcher-config_launcher-win-arm64, launcher-config-admin_launcher-win-arm64, launcher-config-admin-agent_launcher-win-arm64 ]
files:
- src: launcher/resources
dst: resources
Expand All @@ -271,13 +257,12 @@ archives:
{{- .ProjectName }}_launcher_
{{- .RawVersion }}_win_arm64
format: zip
strip_binary_directory: true
universal_binaries:
- id: server
name_template: 'server'
replace: false
- id: server-genCert
name_template: 'genCert'
name_template: 'bin/genCert'
replace: false
checksum:
name_template: '{{ .ProjectName }}_{{ .RawVersion }}_checksums.txt'
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ The following archives are provided:
* **10 IoT on Arm (32 bits)**: aoe2DELanServer_server_*A.B.C*_win_arm32.zip
* **10 (or higher) x86-64 (64 bits)**: aoe2DELanServer_server_*A.B.C*_win_x86-64.zip
* **10 x86-32 (32 bits)**: aoe2DELanServer_server_*A.B.C*_win_x86-32.zip
* **10 (or higher) - all-in-one**: aoe2DELanServer_server_*A.B.C*_win_all.zip
* Linux:
* **Arm64**: aoe2DELanServer_server_*A.B.C*_linux_arm64.tar.gz
* **Arm32**: aoe2DELanServer_server_*A.B.C*_linux_arm32.tar.gz
Expand Down Expand Up @@ -170,6 +169,8 @@ Afterwards, it reverses any changes to allow the official launcher to connect to

## Local development

Rename `go.work.example` to `go.work`

### System requirements

- [Go 1.22](https://go.dev/dl/).
Expand All @@ -190,7 +191,7 @@ Depending on the module you want to debug, you will need to run the correspondin
- launcher: ```task debug:prepare-launcher```
- config: ```task debug:build-config-admin-agent```
- config-admin-agent: ```task debug:build-config-admin```
- watcher: ```task debug:build-config-all```
- agent: ```task debug:build-config-all```

### Build

Expand Down
2 changes: 1 addition & 1 deletion Taskfile.unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tasks:
internal: true
cmds:
- cp -r server/resources build/server/resources
- go build -o build/server/genCert ./server-genCert
- go build -o build/server/bin/genCert ./server-genCert
prepare-server-genCert:
cmds:
- mkdir -p build/server/resources
Loading