Compare commits

...

3 Commits

Author SHA1 Message Date
github-actions[bot]
2f6fefceef chore(release): Update version to v1.4.313 2025-09-16 23:25:48 +00:00
Kayvan Sylvan
43c473d482 Merge pull request #1773 from ksylvan/kayvan/0916-windows-builds
Add Garble Obfuscation for Windows Builds
2025-09-16 16:23:11 -07:00
Kayvan Sylvan
e69858105a feat: add garble obfuscation for Windows builds and fix changelog generation
- Add garble tool installation to release workflow
- Configure garble obfuscation for Windows builds only
- Fix changelog walker to handle unreleased commits
- Update changelog database with latest changes
- Add mvdan to VSCode dictionary settings
- Implement boundary detection for released vs unreleased
- Keep newer commits as "Unreleased" until tagged
2025-09-16 16:19:27 -07:00
8 changed files with 5407 additions and 7 deletions

View File

@@ -44,6 +44,8 @@ jobs:
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Install garble
run: go install mvdan.cc/garble@latest
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:

View File

@@ -11,14 +11,30 @@ before:
# - go generate ./...
builds:
- env:
- id: default
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
- linux
main: ./cmd/fabric
binary: fabric
- id: windows-garbled
env:
- CGO_ENABLED=0
goos:
- windows
main: ./cmd/fabric
binary: fabric
tool: garble
# From https://github.com/eyevanovich/garble-goreleaser-example/blob/main/.goreleaser.yaml
# command is a single string.
# garble's 'build' needs the -literals and -tiny args before it, so we
# trick goreleaser into using -literals as command, and pass -tiny and
# build as flags.
command: "-literals"
flags: [ "-tiny", "-seed=random", "build" ]
ldflags: [ "-s", "-w" ]
archives:
- formats: [tar.gz]

View File

@@ -117,6 +117,7 @@
"modeline",
"modelines",
"mpga",
"mvdan",
"nicksnyder",
"nixpkgs",
"nometa",

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,3 @@
package main
var version = "v1.4.312"
var version = "v1.4.313"

Binary file not shown.

View File

@@ -180,6 +180,15 @@ func (w *Walker) WalkHistory() (map[string]*Version, error) {
return nil, fmt.Errorf("failed to get commit log: %w", err)
}
// Get the latest tag to know the boundary between released and unreleased
latestTag, _ := w.GetLatestTag()
var latestTagHash plumbing.Hash
if latestTag != "" {
if tagRef, err := w.repo.Tag(latestTag); err == nil {
latestTagHash = tagRef.Hash()
}
}
versions := make(map[string]*Version)
currentVersion := "Unreleased"
versions[currentVersion] = &Version{
@@ -188,8 +197,18 @@ func (w *Walker) WalkHistory() (map[string]*Version, error) {
}
prNumbers := make(map[string][]int)
passedLatestTag := false
// If there's no latest tag, treat all commits as belonging to their found versions
if latestTag == "" {
passedLatestTag = true
}
err = commitIter.ForEach(func(c *object.Commit) error {
// Check if we've passed the latest tag boundary
if !passedLatestTag && latestTagHash != (plumbing.Hash{}) && c.Hash == latestTagHash {
passedLatestTag = true
}
// c.Message = Summarize(c.Message)
commit := &Commit{
SHA: c.Hash.String(),
@@ -203,7 +222,12 @@ func (w *Walker) WalkHistory() (map[string]*Version, error) {
if matches := versionPattern.FindStringSubmatch(commit.Message); len(matches) > 1 {
commit.IsVersion = true
commit.Version = matches[1]
currentVersion = commit.Version
// Only change currentVersion if we're past the latest tag
// This keeps newer commits as "Unreleased"
if passedLatestTag {
currentVersion = commit.Version
}
if _, exists := versions[currentVersion]; !exists {
versions[currentVersion] = &Version{

View File

@@ -1 +1 @@
"1.4.312"
"1.4.313"