Skip to content

Commit 2273201

Browse files
committed
Revert "chore: bump version to v0.10.0-rc.2 and use zig cross compilation in the go releaser"
This reverts commit c8e0286.
1 parent 3a5a38d commit 2273201

File tree

6 files changed

+25
-65
lines changed

6 files changed

+25
-65
lines changed

.github/workflows/release.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
labels: ${{ steps.meta.outputs.labels }}
9797

9898
binary:
99-
runs-on: macos-12
99+
runs-on: ubuntu-latest
100100
steps:
101101
- name: Checkout
102102
uses: actions/checkout@v4
@@ -106,18 +106,11 @@ jobs:
106106
uses: actions/setup-go@v5
107107
with:
108108
go-version-file: go.mod
109-
- uses: korandoru/setup-zig@v1
110-
with:
111-
zig-version: master
112-
- name: Set output
113-
id: macos_sdk
114-
run: echo "path=$(xcrun --show-sdk-path)" >> $GITHUB_OUTPUT
115109
- name: Run GoReleaser
116110
uses: goreleaser/goreleaser-action@v5
117111
with:
118112
distribution: goreleaser
119113
version: latest
120114
args: release --clean
121115
env:
122-
SDK_PATH: ${{ steps.macos_sdk.outputs.path }}
123116
GITHUB_TOKEN: ${{ secrets.DEPLOY_ACCESS_TOKEN }}

.goreleaser.yml

Lines changed: 12 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -8,67 +8,32 @@ before:
88

99
# .goreleaser.yml
1010
builds:
11-
- id: goreleaser-zig-cross-compilation-macos
11+
- id: default
1212
main: ./cmd/kcl/main.go
1313
binary: kcl
1414
goos:
1515
- darwin
16-
goarch:
17-
- amd64
18-
- arm64
19-
ldflags:
20-
- "-X kcl-lang.io/cli/pkg/version.version={{.Version}}"
21-
env:
22-
- CGO_ENABLED=1
23-
- >-
24-
{{- if eq .Os "darwin" }}
25-
{{- if eq .Arch "amd64"}}CC=zig c++ -target x86_64-macos-none -F{{ .Env.SDK_PATH }}/System/Library/Frameworks{{- end }}
26-
{{- if eq .Arch "arm64"}}CC=zig c++ -target aarch64-macos-none -F{{ .Env.SDK_PATH }}/System/Library/Frameworks{{- end }}
27-
{{- end }}
28-
29-
- id: goreleaser-zig-cross-compilation-linux
30-
main: ./cmd/kcl/main.go
31-
binary: kcl
32-
goos:
3316
- linux
17+
- windows
3418
goarch:
3519
- amd64
3620
- arm64
21+
flags:
22+
- -tags=rpc
3723
ldflags:
3824
- "-X kcl-lang.io/cli/pkg/version.version={{.Version}}"
39-
env:
40-
- CGO_ENABLED=1
41-
- >-
42-
{{- if eq .Os "linux" }}
43-
{{- if eq .Arch "amd64" }}CC=zig c++ -target x86_64-linux-musl{{- end }}
44-
{{- if eq .Arch "arm64"}}CC=zig c++ -target aarch64-linux-musl{{- end }}
45-
{{- end }}
46-
47-
- id: goreleaser-zig-cross-compilation-windows
48-
main: ./cmd/kcl/main.go
49-
binary: kcl
50-
goos:
51-
- windows
52-
goarch:
53-
- amd64
54-
ldflags:
55-
- "-X kcl-lang.io/cli/pkg/version.version={{.Version}}"
56-
env:
57-
- CGO_ENABLED=1
58-
- >-
59-
{{- if eq .Os "windows" }}
60-
{{- if eq .Arch "amd64" }}CC=zig c++ -target x86_64-windows-gnu{{- end }}
61-
{{- if eq .Arch "arm64"}}CC=zig c++ -target aarch64-windows-gnu{{- end }}
62-
{{- end }}
6325

6426
archives:
65-
- format: tar.gz
66-
# this name template makes the OS and Arch compatible with the results of uname.
27+
- id: default
28+
builds:
29+
- default
6730
name_template: "kcl-v{{ .Version }}-{{ .Os }}-{{ .Arch }}"
68-
# use zip for windows archives
6931
format_overrides:
70-
- goos: windows
71-
format: zip
32+
- goos: windows
33+
format: zip
34+
# Put kcl-language-server binaries into add to the kcl archive.
35+
# files:
36+
# - ./bin/kcl-lsp-v{{ .Version }}-{{ .Os }}-{{ .Arch }}/*
7237

7338
brews:
7439
- tap:

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.10.0-rc.2
1+
0.10.0-rc.1

go.mod

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
module kcl-lang.io/cli
22

3-
go 1.23
3+
go 1.22.4
4+
5+
toolchain go1.22.5
46

57
require (
68
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
79
github.com/onsi/ginkgo/v2 v2.20.2
810
github.com/onsi/gomega v1.34.2
911
github.com/spf13/cobra v1.8.1
1012
github.com/stretchr/testify v1.9.0
11-
kcl-lang.io/kcl-go v0.10.0-rc.2
13+
kcl-lang.io/kcl-go v0.10.0-rc.1
1214
kcl-lang.io/kcl-openapi v0.9.0
1315
kcl-lang.io/kcl-plugin v0.6.0
1416
kcl-lang.io/kpm v0.10.0-rc.1.0.20240913073358-31d2c0f714fb
@@ -70,7 +72,7 @@ require (
7072
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
7173
google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 // indirect
7274
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect
73-
kcl-lang.io/lib v0.10.0-rc.2 // indirect
75+
kcl-lang.io/lib v0.10.0-rc.1 // indirect
7476
)
7577

7678
require (

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1692,16 +1692,16 @@ k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
16921692
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
16931693
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A=
16941694
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
1695-
kcl-lang.io/kcl-go v0.10.0-rc.2 h1:14gXd+taLB64jQ4E0lMtMGi/Mg2rD3dA62etUGPQVJU=
1696-
kcl-lang.io/kcl-go v0.10.0-rc.2/go.mod h1:IiWdIo5X9eC+EXob39j7jPPytDaMdKhYau62toXNpEs=
1695+
kcl-lang.io/kcl-go v0.10.0-rc.1 h1:6jH1xSW/WsoXQLy++71prlL8DpkXflx0BKFN5Xyi2sI=
1696+
kcl-lang.io/kcl-go v0.10.0-rc.1/go.mod h1:7qUv6g/II7VmGUMXmwxdma1bR2UgLGNC3VopfDj0tSU=
16971697
kcl-lang.io/kcl-openapi v0.9.0 h1:HUnc5pUGde83PI5CAe1ZvZhdbcxD9X2ABUp1tV+oYqw=
16981698
kcl-lang.io/kcl-openapi v0.9.0/go.mod h1:kGCf0AZygrZyB+xpmMtiC3FYoiV/1rCLXuAq2QtuLf8=
16991699
kcl-lang.io/kcl-plugin v0.6.0 h1:rBdoqKDPdOtojeOHCFnXoB/I7ltFjV61r0KkfOcL5sE=
17001700
kcl-lang.io/kcl-plugin v0.6.0/go.mod h1:LoIouleHYRKAvFcdW30yUlhsMYH2W9zD5Ji1XHfbht4=
17011701
kcl-lang.io/kpm v0.10.0-rc.1.0.20240913073358-31d2c0f714fb h1:3GxW+i4paPgzwegnQJDV1GU/e+0uBe1oGFNZVAteGR4=
17021702
kcl-lang.io/kpm v0.10.0-rc.1.0.20240913073358-31d2c0f714fb/go.mod h1:zYz5oAEvg+cFjA12djw1Z6bErLd69L5dcYLkCOpcz68=
1703-
kcl-lang.io/lib v0.10.0-rc.2 h1:zMiwQVKzKqLD0gRPuKdDgX0MzbcWe8a+IlsXhhWeUvk=
1704-
kcl-lang.io/lib v0.10.0-rc.2/go.mod h1:tu+tzwGgHLzYZSIxUG/ntipStrxZd6OvutWYPTxS7cs=
1703+
kcl-lang.io/lib v0.10.0-rc.1 h1:HRHMW2ane3mjKMVBUQQVvln9Z7FDkUJVXRWEVXPtP+w=
1704+
kcl-lang.io/lib v0.10.0-rc.1/go.mod h1:tu+tzwGgHLzYZSIxUG/ntipStrxZd6OvutWYPTxS7cs=
17051705
oras.land/oras-go v1.2.6 h1:z8cmxQXBU8yZ4mkytWqXfo6tZcamPwjsuxYU81xJ8Lk=
17061706
oras.land/oras-go v1.2.6/go.mod h1:OVPc1PegSEe/K8YiLfosrlqlqTN9PUyFvOw5Y9gwrT8=
17071707
oras.land/oras-go/v2 v2.5.0 h1:o8Me9kLY74Vp5uw07QXPiitjsw7qNXi8Twd+19Zf02c=

pkg/version/version.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ func getVersion(version string) string {
3232
}
3333

3434
const (
35-
VersionTypeLatest = Version_0_10_0_rc2
35+
VersionTypeLatest = Version_0_10_0_rc1
3636

37-
Version_0_10_0_rc2 VersionType = "0.10.0-rc.2"
37+
Version_0_10_0_rc1 VersionType = "0.10.0-rc.1"
3838

3939
Version_0_9_8 VersionType = "0.9.8"
4040
Version_0_9_7 VersionType = "0.9.7"

0 commit comments

Comments
 (0)