tangled
alpha
login
or
join now
atscan.net
/
plcbundle-go
1
fork
atom
[DEPRECATED] Go implementation of plcbundle
1
fork
atom
overview
issues
pulls
pipelines
update goreleaser
tree.fail
4 months ago
afa27df4
0a93b6e3
+23
-49
3 changed files
expand all
collapse all
unified
split
.goreleaser.yml
.tangled
workflows
build.yml
release.yml
+3
-21
.goreleaser.yml
···
1
version: 2
2
3
-
project_name: plcbundle
4
-
5
-
before:
6
-
hooks:
7
-
- go mod tidy
8
-
- go test ./...
9
-
10
builds:
11
-
- id: plcbundle
12
-
main: ./cmd/plcbundle
13
binary: plcbundle
14
env:
15
- CGO_ENABLED=1
16
-
# Only build for current platform locally
17
-
goos:
18
-
- darwin
19
-
goarch:
20
-
- arm64
21
ldflags:
22
- -s -w
23
- -X main.version={{.Version}}
24
-
- -X main.gitCommit={{.ShortCommit}}
25
-
- -X main.buildDate={{.Date}}
26
27
archives:
28
- formats: ["tar.gz"]
29
-
name_template: >-
30
-
{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}
31
-
32
-
checksum:
33
-
name_template: 'checksums.txt'
34
35
release:
36
disable: true
···
1
version: 2
2
0
0
0
0
0
0
0
3
builds:
4
+
- main: ./cmd/plcbundle
0
5
binary: plcbundle
6
env:
7
- CGO_ENABLED=1
8
+
goos: [linux]
9
+
goarch: [amd64, arm64]
0
0
0
10
ldflags:
11
- -s -w
12
- -X main.version={{.Version}}
0
0
13
14
archives:
15
- formats: ["tar.gz"]
0
0
0
0
0
16
17
release:
18
disable: true
+10
-8
.tangled/workflows/build.yml
···
9
dependencies:
10
nixpkgs:
11
- go
12
-
- goreleaser
0
0
0
13
14
environment:
15
-
CGO_ENABLED: "0"
0
16
17
steps:
18
- name: "Download dependencies"
···
24
command: |
25
go test -v ./...
26
27
-
- name: "Build snapshot (test cross-compilation)"
28
command: |
29
-
goreleaser build --snapshot --clean
30
-
31
-
- name: "Show artifacts"
32
-
command: |
33
-
ls -lh dist/
···
9
dependencies:
10
nixpkgs:
11
- go
12
+
- gcc
13
+
- git
14
+
- zstd
15
+
- zstd.dev
16
17
environment:
18
+
CGO_ENABLED: "1"
19
+
GOPATH: "/workspace/go"
20
21
steps:
22
- name: "Download dependencies"
···
28
command: |
29
go test -v ./...
30
31
+
- name: "Build binary"
32
command: |
33
+
go build -o plcbundle ./cmd/plcbundle
34
+
./plcbundle version
35
+
echo "✓ Build successful"
0
0
+10
-20
.tangled/workflows/release.yml
···
10
dependencies:
11
nixpkgs:
12
- go
0
13
- gcc
14
-
- gnumake
15
-
- zstd
16
- git
0
0
17
18
-
steps:
19
-
- name: "Build Linux binaries (native with CGO)"
20
-
command: |
21
-
# Build for current platform (Linux)
22
-
CGO_ENABLED=1 go build \
23
-
-ldflags="-s -w -X main.version=$(git describe --tags --always) -X main.gitCommit=$(git rev-parse --short HEAD)" \
24
-
-o dist/plcbundle_linux_amd64/plcbundle \
25
-
./cmd/plcbundle
26
-
27
-
echo "✓ Linux binary built:"
28
-
ls -lh dist/plcbundle_linux_amd64/plcbundle
29
30
-
- name: "Create archive"
0
31
command: |
32
-
cd dist
33
-
tar -czf plcbundle_$(git describe --tags)_linux_amd64.tar.gz plcbundle_linux_amd64/
34
-
sha256sum *.tar.gz > checksums.txt
35
-
36
-
echo "✓ Artifacts:"
37
-
ls -lh *.tar.gz checksums.txt
···
10
dependencies:
11
nixpkgs:
12
- go
13
+
- goreleaser
14
- gcc
0
0
15
- git
16
+
- zstd
17
+
- zstd.dev
18
19
+
environment:
20
+
CGO_ENABLED: "1"
0
0
0
0
0
0
0
0
0
21
22
+
steps:
23
+
- name: "Build with GoReleaser"
24
command: |
25
+
goreleaser build --clean
26
+
echo "✓ Binaries built:"
27
+
ls -lh dist/*/plcbundle
0
0
0