Skip to content

Commit

Permalink
release: 1.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
oddmario committed Sep 15, 2024
1 parent 47ee08d commit 7011b65
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
1 change: 0 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: 0
run: |
go build -o simpledns_${{ matrix.goos }}_${{ matrix.goarch }} -ldflags="-w -s" -trimpath -v .
go build -o simpledns_${{ matrix.goos }}_${{ matrix.goarch }}_debug -trimpath -v .
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ jobs:
go-version: '1.22.6'

- name: Build with Go
env:
CGO_ENABLED: 0
run: |
platforms=(
"linux amd64 simpledns_linux_amd64"
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## v1.2.6

### Changed
* Don't set `CGO_ENABLED` to zero while compiling.
* Updated the `build.py` builder to generate more optimised binaries

## v1.2.5

### Fixed
Expand Down
9 changes: 4 additions & 5 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,25 @@ def patcher(undo = False):
file.write(filedata)

def cleanGoBuildCache():
subprocess.check_output(["go", "clean", "-cache"])
subprocess.check_output("go clean -cache", shell=True)

def build():
sys_env = os.environ.copy()

print("Building for Linux amd64...")
sys_env['GOARCH'] = "amd64"
sys_env['GOOS'] = "linux"
sys_env['CGO_ENABLED'] = "0"
subprocess.check_output(["go", "build", "-o", "bin/simpledns_linux_amd64"], env=sys_env)
subprocess.check_output("go build -o bin/simpledns_linux_amd64 -ldflags=\"-w -s\" -trimpath -v", env=sys_env, shell=True)

print("Building for Linux arm64...")
sys_env['GOARCH'] = "arm64"
sys_env['GOOS'] = "linux"
subprocess.check_output(["go", "build", "-o", "bin/simpledns_linux_arm64"], env=sys_env)
subprocess.check_output("go build -o bin/simpledns_linux_arm64 -ldflags=\"-w -s\" -trimpath -v", env=sys_env, shell=True)

print("Building for Windows amd64...")
sys_env['GOARCH'] = "amd64"
sys_env['GOOS'] = "windows"
subprocess.check_output(["go", "build", "-o", "bin/simpledns_windows_amd64.exe"], env=sys_env)
subprocess.check_output("go build -o bin/simpledns_windows_amd64.exe -ldflags=\"-w -s\" -trimpath -v", env=sys_env, shell=True)

def main():
patcher()
Expand Down
2 changes: 1 addition & 1 deletion constants/constants.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package constants

var ConfigFilePath string = ""
var Version string = "1.2.5"
var Version string = "1.2.6"

0 comments on commit 7011b65

Please sign in to comment.