readme: add build instructions

This commit is contained in:
Greg T. Wallace 2025-06-19 16:27:22 -04:00
parent f5efcd7985
commit d869d7a2c9
2 changed files with 23 additions and 11 deletions

View file

@ -171,6 +171,15 @@ separate script.
![Cert Warden with APC P15 Tool](https://raw.githubusercontent.com/gregtwallace/apc-p15-tool/main/img/apc-p15-tool.png)
## Building
Python3, Go, and git all must be installed to run the build script.
Once the dependencies are installed, clone this repo and run
`python build_release.py`. If you only want to build for certain OS or
ARCH targets, edit the `targets` array in the `build_release.py` file
before running it.
## Links
@Owl-Tec's write up using this tool with ACDS:

View file

@ -8,6 +8,20 @@ import tarfile
# output path (relative to this script)
outRelativeDir = "_out"
# target strings must be in the format:
# `GOOS_GOARCH`
# see: https://github.com/golang/go/blob/master/src/internal/syslist/syslist.go
# or unofficially: https://gist.github.com/asukakenji/f15ba7e588ac42795f421b48b8aede63
targets = [
"windows_amd64",
"linux_amd64",
"linux_arm64",
"darwin_amd64",
"darwin_arm64",
"freebsd_amd64",
"freebsd_arm64",
]
###
# Script
@ -25,17 +39,6 @@ os.makedirs(releaseDir)
# get version number / tag
gitTag = subprocess.check_output("git describe --tags --abbrev=0").decode('utf-8').strip()
# # GOOS_GOARCH to build for
targets = [
"windows_amd64",
"linux_amd64",
"linux_arm64",
"darwin_amd64",
"darwin_arm64",
"freebsd_amd64",
"freebsd_arm64",
]
# loop through and build all targets
for target in targets:
# environment vars