Skip to content

Commit

Permalink
Revert "chore: bump version to v0.10.0-rc.2 and use zig cross compila…
Browse files Browse the repository at this point in the history
…tion in the go releaser"

This reverts commit c8e0286.
  • Loading branch information
Peefy committed Sep 16, 2024
1 parent 3a5a38d commit 2273201
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 65 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}

binary:
runs-on: macos-12
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -106,18 +106,11 @@ jobs:
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: korandoru/setup-zig@v1
with:
zig-version: master
- name: Set output
id: macos_sdk
run: echo "path=$(xcrun --show-sdk-path)" >> $GITHUB_OUTPUT
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean
env:
SDK_PATH: ${{ steps.macos_sdk.outputs.path }}
GITHUB_TOKEN: ${{ secrets.DEPLOY_ACCESS_TOKEN }}
59 changes: 12 additions & 47 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,67 +8,32 @@ before:

# .goreleaser.yml
builds:
- id: goreleaser-zig-cross-compilation-macos
- id: default
main: ./cmd/kcl/main.go
binary: kcl
goos:
- darwin
goarch:
- amd64
- arm64
ldflags:
- "-X kcl-lang.io/cli/pkg/version.version={{.Version}}"
env:
- CGO_ENABLED=1
- >-
{{- if eq .Os "darwin" }}
{{- if eq .Arch "amd64"}}CC=zig c++ -target x86_64-macos-none -F{{ .Env.SDK_PATH }}/System/Library/Frameworks{{- end }}
{{- if eq .Arch "arm64"}}CC=zig c++ -target aarch64-macos-none -F{{ .Env.SDK_PATH }}/System/Library/Frameworks{{- end }}
{{- end }}
- id: goreleaser-zig-cross-compilation-linux
main: ./cmd/kcl/main.go
binary: kcl
goos:
- linux
- windows
goarch:
- amd64
- arm64
flags:
- -tags=rpc
ldflags:
- "-X kcl-lang.io/cli/pkg/version.version={{.Version}}"
env:
- CGO_ENABLED=1
- >-
{{- if eq .Os "linux" }}
{{- if eq .Arch "amd64" }}CC=zig c++ -target x86_64-linux-musl{{- end }}
{{- if eq .Arch "arm64"}}CC=zig c++ -target aarch64-linux-musl{{- end }}
{{- end }}
- id: goreleaser-zig-cross-compilation-windows
main: ./cmd/kcl/main.go
binary: kcl
goos:
- windows
goarch:
- amd64
ldflags:
- "-X kcl-lang.io/cli/pkg/version.version={{.Version}}"
env:
- CGO_ENABLED=1
- >-
{{- if eq .Os "windows" }}
{{- if eq .Arch "amd64" }}CC=zig c++ -target x86_64-windows-gnu{{- end }}
{{- if eq .Arch "arm64"}}CC=zig c++ -target aarch64-windows-gnu{{- end }}
{{- end }}

archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of uname.
- id: default
builds:
- default
name_template: "kcl-v{{ .Version }}-{{ .Os }}-{{ .Arch }}"
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
- goos: windows
format: zip
# Put kcl-language-server binaries into add to the kcl archive.
# files:
# - ./bin/kcl-lsp-v{{ .Version }}-{{ .Os }}-{{ .Arch }}/*

brews:
- tap:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.0-rc.2
0.10.0-rc.1
8 changes: 5 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
module kcl-lang.io/cli

go 1.23
go 1.22.4

toolchain go1.22.5

require (
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
github.com/onsi/ginkgo/v2 v2.20.2
github.com/onsi/gomega v1.34.2
github.com/spf13/cobra v1.8.1
github.com/stretchr/testify v1.9.0
kcl-lang.io/kcl-go v0.10.0-rc.2
kcl-lang.io/kcl-go v0.10.0-rc.1
kcl-lang.io/kcl-openapi v0.9.0
kcl-lang.io/kcl-plugin v0.6.0
kcl-lang.io/kpm v0.10.0-rc.1.0.20240913073358-31d2c0f714fb
Expand Down Expand Up @@ -70,7 +72,7 @@ require (
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect
kcl-lang.io/lib v0.10.0-rc.2 // indirect
kcl-lang.io/lib v0.10.0-rc.1 // indirect
)

require (
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1692,16 +1692,16 @@ k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A=
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
kcl-lang.io/kcl-go v0.10.0-rc.2 h1:14gXd+taLB64jQ4E0lMtMGi/Mg2rD3dA62etUGPQVJU=
kcl-lang.io/kcl-go v0.10.0-rc.2/go.mod h1:IiWdIo5X9eC+EXob39j7jPPytDaMdKhYau62toXNpEs=
kcl-lang.io/kcl-go v0.10.0-rc.1 h1:6jH1xSW/WsoXQLy++71prlL8DpkXflx0BKFN5Xyi2sI=
kcl-lang.io/kcl-go v0.10.0-rc.1/go.mod h1:7qUv6g/II7VmGUMXmwxdma1bR2UgLGNC3VopfDj0tSU=
kcl-lang.io/kcl-openapi v0.9.0 h1:HUnc5pUGde83PI5CAe1ZvZhdbcxD9X2ABUp1tV+oYqw=
kcl-lang.io/kcl-openapi v0.9.0/go.mod h1:kGCf0AZygrZyB+xpmMtiC3FYoiV/1rCLXuAq2QtuLf8=
kcl-lang.io/kcl-plugin v0.6.0 h1:rBdoqKDPdOtojeOHCFnXoB/I7ltFjV61r0KkfOcL5sE=
kcl-lang.io/kcl-plugin v0.6.0/go.mod h1:LoIouleHYRKAvFcdW30yUlhsMYH2W9zD5Ji1XHfbht4=
kcl-lang.io/kpm v0.10.0-rc.1.0.20240913073358-31d2c0f714fb h1:3GxW+i4paPgzwegnQJDV1GU/e+0uBe1oGFNZVAteGR4=
kcl-lang.io/kpm v0.10.0-rc.1.0.20240913073358-31d2c0f714fb/go.mod h1:zYz5oAEvg+cFjA12djw1Z6bErLd69L5dcYLkCOpcz68=
kcl-lang.io/lib v0.10.0-rc.2 h1:zMiwQVKzKqLD0gRPuKdDgX0MzbcWe8a+IlsXhhWeUvk=
kcl-lang.io/lib v0.10.0-rc.2/go.mod h1:tu+tzwGgHLzYZSIxUG/ntipStrxZd6OvutWYPTxS7cs=
kcl-lang.io/lib v0.10.0-rc.1 h1:HRHMW2ane3mjKMVBUQQVvln9Z7FDkUJVXRWEVXPtP+w=
kcl-lang.io/lib v0.10.0-rc.1/go.mod h1:tu+tzwGgHLzYZSIxUG/ntipStrxZd6OvutWYPTxS7cs=
oras.land/oras-go v1.2.6 h1:z8cmxQXBU8yZ4mkytWqXfo6tZcamPwjsuxYU81xJ8Lk=
oras.land/oras-go v1.2.6/go.mod h1:OVPc1PegSEe/K8YiLfosrlqlqTN9PUyFvOw5Y9gwrT8=
oras.land/oras-go/v2 v2.5.0 h1:o8Me9kLY74Vp5uw07QXPiitjsw7qNXi8Twd+19Zf02c=
Expand Down
4 changes: 2 additions & 2 deletions pkg/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ func getVersion(version string) string {
}

const (
VersionTypeLatest = Version_0_10_0_rc2
VersionTypeLatest = Version_0_10_0_rc1

Version_0_10_0_rc2 VersionType = "0.10.0-rc.2"
Version_0_10_0_rc1 VersionType = "0.10.0-rc.1"

Version_0_9_8 VersionType = "0.9.8"
Version_0_9_7 VersionType = "0.9.7"
Expand Down

0 comments on commit 2273201

Please sign in to comment.