mirror of
https://github.com/indig0fox/Arma3-AttendanceTracker.git/
synced 2025-12-08 09:51:47 -06:00
add versioning info to build process in Readme
This commit is contained in:
18
README
18
README
@@ -199,17 +199,23 @@ Once it's built, copy the file from ./dist to the project root, then build the a
|
|||||||
|
|
||||||
#### COMPILING FOR WINDOWS
|
#### COMPILING FOR WINDOWS
|
||||||
|
|
||||||
```bash
|
```ps1
|
||||||
docker pull x1unix/go-mingw:1.20
|
docker pull x1unix/go-mingw:1.20
|
||||||
|
|
||||||
|
# version is semantic + build date + git hash
|
||||||
|
# e.g. 1.0.0-2021-05-30-1a2b3c4d
|
||||||
|
$versionSem = '0.2.0'
|
||||||
|
$dateStr = Get-Date -Format 'yyyyMMdd'
|
||||||
|
$version = "$versionSem-$dateStr-$(git rev-parse --short HEAD)"
|
||||||
|
|
||||||
# Compile x64 Windows DLL
|
# Compile x64 Windows DLL
|
||||||
docker run --rm -it -v ${PWD}:/go/work -w /go/work x1unix/go-mingw:1.20 go build -o dist/AttendanceTracker_x64.dll -buildmode=c-shared -ldflags '-w -s' ./cmd
|
docker run --rm -it -v ${PWD}:/go/work -w /go/work x1unix/go-mingw:1.20 go build -o dist/AttendanceTracker_x64.dll -buildmode=c-shared -ldflags "-w -s -X main.EXTENSION_VERSION=$version" ./cmd
|
||||||
|
|
||||||
# Compile x86 Windows DLL
|
# Compile x86 Windows DLL
|
||||||
docker run --rm -it -v ${PWD}:/go/work -w /go/work -e GOARCH=386 x1unix/go-mingw:1.20 go build -o dist/AttendanceTracker.dll -buildmode=c-shared -ldflags '-w -s' ./cmd
|
docker run --rm -it -v ${PWD}:/go/work -w /go/work -e GOARCH=386 x1unix/go-mingw:1.20 go build -o dist/AttendanceTracker.dll -buildmode=c-shared -ldflags "-w -s -X main.EXTENSION_VERSION=$version" ./cmd
|
||||||
|
|
||||||
# Compile x64 Windows EXE
|
# Compile x64 Windows EXE
|
||||||
docker run --rm -it -v ${PWD}:/go/work -w /go/work x1unix/go-mingw:1.20 go build -o dist/AttendanceTracker_x64.exe -ldflags '-w -s' ./cmd
|
docker run --rm -it -v ${PWD}:/go/work -w /go/work x1unix/go-mingw:1.20 go build -o dist/AttendanceTracker_x64.exe -ldflags "-w -s -X main.EXTENSION_VERSION=$version" ./cmd
|
||||||
```
|
```
|
||||||
|
|
||||||
#### COMPILING FOR LINUX
|
#### COMPILING FOR LINUX
|
||||||
@@ -218,10 +224,10 @@ docker run --rm -it -v ${PWD}:/go/work -w /go/work x1unix/go-mingw:1.20 go build
|
|||||||
docker build -t indifox926/build-a3go:linux-so -f ./build/Dockerfile.build ./cmd
|
docker build -t indifox926/build-a3go:linux-so -f ./build/Dockerfile.build ./cmd
|
||||||
|
|
||||||
# Compile x64 Linux .so
|
# Compile x64 Linux .so
|
||||||
docker run --rm -it -v ${PWD}:/app -e GOOS=linux -e GOARCH=amd64 -e CGO_ENABLED=1 -e CC=gcc indifox926/build-a3go:linux-so go build -o dist/AttendanceTracker_x64.so -linkshared -ldflags '-w -s' ./cmd
|
docker run --rm -it -v ${PWD}:/app -e GOOS=linux -e GOARCH=amd64 -e CGO_ENABLED=1 -e CC=gcc indifox926/build-a3go:linux-so go build -o dist/AttendanceTracker_x64.so -linkshared -ldflags "-w -s -X main.EXTENSION_VERSION=$version" ./cmd
|
||||||
|
|
||||||
# Compile x86 Linux .so
|
# Compile x86 Linux .so
|
||||||
docker run --rm -it -v ${PWD}:/app -e GOOS=linux -e GOARCH=386 -e CGO_ENABLED=1 -e CC=gcc indifox926/build-a3go:linux-so go build -o dist/AttendanceTracker.so -linkshared -ldflags '-w -s' ./cmd
|
docker run --rm -it -v ${PWD}:/app -e GOOS=linux -e GOARCH=386 -e CGO_ENABLED=1 -e CC=gcc indifox926/build-a3go:linux-so go build -o dist/AttendanceTracker.so -linkshared -ldflags "-w -s -X main.EXTENSION_VERSION=$version" ./cmd
|
||||||
```
|
```
|
||||||
|
|
||||||
### Compile Addon
|
### Compile Addon
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import (
|
|||||||
|
|
||||||
const EXTENSION_NAME string = "AttendanceTracker"
|
const EXTENSION_NAME string = "AttendanceTracker"
|
||||||
const ADDON_NAME string = "AttendanceTracker"
|
const ADDON_NAME string = "AttendanceTracker"
|
||||||
const EXTENSION_VERSION string = "0.9.0.1"
|
const EXTENSION_VERSION string = "dev"
|
||||||
|
|
||||||
// file paths
|
// file paths
|
||||||
const ATTENDANCE_TABLE string = "attendance"
|
const ATTENDANCE_TABLE string = "attendance"
|
||||||
|
|||||||
Reference in New Issue
Block a user