Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: remove not release tag for pg parser and pg advisor (#1803)

rebelice46724e549d6e
diff --git a/.github/workflows/build-artifacts-and-draft-release.yml b/.github/workflows/build-artifacts-and-draft-release.yml
index 6bce6fecb0..d077ba78b1 100644
--- a/.github/workflows/build-artifacts-and-draft-release.yml
+++ b/.github/workflows/build-artifacts-and-draft-release.yml
@@ -6,7 +6,7 @@ on:
- "*.*.*"
jobs:
- release-binary:
+ release-linux-binary:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@@ -27,9 +27,38 @@ jobs:
go-version: 1.16
check-latest: true
cache: true
+ - name: Install cross-compiler for linux/arm64
+ run: sudo apt-get -y install gcc-aarch64-linux-gnu
- name: Release
uses: goreleaser/goreleaser-action@v2
with:
- args: release
+ args: release --config .goreleaser-for-linux.yaml
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ release-darwin-binary:
+ runs-on: macos-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: pnpm/[email protected]
+ with:
+ version: 6.10.0
+ - uses: actions/setup-node@v3
+ with:
+ node-version: "14"
+ cache: pnpm
+ cache-dependency-path: "frontend/pnpm-lock.yaml"
+ - run: pnpm install --frozen-lockfile
+ working-directory: frontend
+ - run: pnpm release
+ working-directory: frontend
+ - uses: actions/setup-go@v3
+ with:
+ go-version: 1.16
+ check-latest: true
+ cache: true
+ - name: Release
+ uses: goreleaser/goreleaser-action@v2
+ with:
+ args: release --config .goreleaser-for-darwin.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 3862a7a45b..dd4ce6069d 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -30,7 +30,7 @@ jobs:
args: -v
# Copied from draft-release.yml, should be consistent if updating draft-release.yml.
- release-dry-run:
+ release-dry-run-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@@ -51,10 +51,40 @@ jobs:
go-version: 1.16
check-latest: true
cache: true
+ - name: Install cross-compiler for linux/arm64
+ run: sudo apt-get -y install gcc-aarch64-linux-gnu
- name: Release dry-run
uses: goreleaser/goreleaser-action@v2
with:
- args: release --skip-publish
+ args: release --skip-publish --config .goreleaser-for-linux.yaml
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ release-dry-run-darwin:
+ runs-on: macos-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: pnpm/[email protected]
+ with:
+ version: 6.10.0
+ - uses: actions/setup-node@v3
+ with:
+ node-version: "14"
+ cache: pnpm
+ cache-dependency-path: "frontend/pnpm-lock.yaml"
+ - run: pnpm install --frozen-lockfile
+ working-directory: frontend
+ - run: pnpm release
+ working-directory: frontend
+ - uses: actions/setup-go@v3
+ with:
+ go-version: 1.16
+ check-latest: true
+ cache: true
+ - name: Release dry-run
+ uses: goreleaser/goreleaser-action@v2
+ with:
+ args: release --skip-publish --config .goreleaser-for-darwin.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.goreleaser.yaml b/.goreleaser-for-darwin.yaml
similarity index 97%
rename from .goreleaser.yaml
rename to .goreleaser-for-darwin.yaml
index abee95c866..b4475da78c 100644
--- a/.goreleaser.yaml
+++ b/.goreleaser-for-darwin.yaml
@@ -18,11 +18,11 @@ builds:
env:
- VERSION="development"
- GO_VERSION="1.16.5"
+ - CGO_ENABLED=1
- GIT_COMMIT="unknown"
- BUILD_TIME="unknown"
- BUILD_USER="unknown"
goos:
- - linux
- darwin
goarch:
- amd64
@@ -42,11 +42,11 @@ builds:
env:
- VERSION="development"
- GO_VERSION="1.16.5"
+ - CGO_ENABLED=1
- GIT_COMMIT="unknown"
- BUILD_TIME="unknown"
- BUILD_USER="unknown"
goos:
- - linux
- darwin
goarch:
- amd64
diff --git a/.goreleaser-for-linux.yaml b/.goreleaser-for-linux.yaml
new file mode 100644
index 0000000000..74473b8e89
--- /dev/null
+++ b/.goreleaser-for-linux.yaml
@@ -0,0 +1,102 @@
+before:
+ hooks:
+ - go mod tidy
+builds:
+ - id: server
+ main: ./bin/server
+ binary: bytebase
+ ldflags:
+ - -w -s
+ - -X github.com/bytebase/bytebase/bin/server/cmd.version={{.Version}}
+ - -X github.com/bytebase/bytebase/bin/server/cmd.goversion=${GO_VERSION}
+ - -X github.com/bytebase/bytebase/bin/server/cmd.gitcommit={{.Commit}}
+ - -X github.com/bytebase/bytebase/bin/server/cmd.buildtime={{.Timestamp}}
+ - -X github.com/bytebase/bytebase/bin/server/cmd.builduser=goreleaser
+ tags:
+ - release
+ - embed_frontend
+ env:
+ - VERSION="development"
+ - GO_VERSION="1.16.5"
+ - CGO_ENABLED=1
+ - GIT_COMMIT="unknown"
+ - BUILD_TIME="unknown"
+ - BUILD_USER="unknown"
+ goos:
+ - linux
+ goarch:
+ - amd64
+ - arm64
+ overrides:
+ - goos: linux
+ goarch: arm64
+ env:
+ - CC=aarch64-linux-gnu-gcc
+ - goos: linux
+ goarch: amd64
+ env:
+ - CC=gcc
+ - id: cli
+ main: ./bin/bb
+ binary: bb
+ ldflags:
+ - -w -s
+ - -X github.com/bytebase/bytebase/bin/bb/cmd.version={{.Version}}
+ - -X github.com/bytebase/bytebase/bin/bb/cmd.goversion=${GO_VERSION}
+ - -X github.com/bytebase/bytebase/bin/bb/cmd.gitcommit={{.Commit}}
+ - -X github.com/bytebase/bytebase/bin/bb/cmd.buildtime={{.Timestamp}}
+ - -X github.com/bytebase/bytebase/bin/bb/cmd.builduser=goreleaser
+ tags:
+ - release
+ env:
+ - VERSION="development"
+ - GO_VERSION="1.16.5"
+ - CGO_ENABLED=1
+ - GIT_COMMIT="unknown"
+ - BUILD_TIME="unknown"
+ - BUILD_USER="unknown"
+ goos:
+ - linux
+ goarch:
+ - amd64
+ - arm64
+ overrides:
+ - goos: linux
+ goarch: arm64
+ env:
+ - CC=aarch64-linux-gnu-gcc
+ - goos: linux
+ goarch: amd64
+ env:
+ - CC=gcc
+archives:
+ - replacements:
+ darwin: Darwin
+ linux: Linux
+ amd64: x86_64
+checksum:
+ name_template: "checksums.txt"
+snapshot:
+ name_template: "{{ incpatch .Version }}-next"
+changelog:
+ sort: asc
+ filters:
+ exclude:
+ - "^docs:"
+ - "^test:"
+release:
+ draft: true
+ mode: append
+ name_template: "Release {{.Tag}}"
+ header: |
+ # What's Changed
+
+ ## 🚀 Features
+
+ ## 🎄 Enhancements
+
+ ## 🎠 Community
+
+ ## New Contributors
+
+ ## Code Diff
diff --git a/plugin/advisor/pg/advisor_naming_column.go b/plugin/advisor/pg/advisor_naming_column.go
index 21f86685b2..93ccfab50a 100644
--- a/plugin/advisor/pg/advisor_naming_column.go
+++ b/plugin/advisor/pg/advisor_naming_column.go
@@ -1,6 +1,3 @@
-//go:build !release
-// +build !release
-
package pg
import (
diff --git a/plugin/advisor/pg/advisor_naming_column_test.go b/plugin/advisor/pg/advisor_naming_column_test.go
index d7b554b957..cb02ac6546 100644
--- a/plugin/advisor/pg/advisor_naming_column_test.go
+++ b/plugin/advisor/pg/advisor_naming_column_test.go
@@ -1,6 +1,3 @@
-//go:build !release
-// +build !release
-
package pg
import (
diff --git a/plugin/advisor/pg/advisor_naming_table.go b/plugin/advisor/pg/advisor_naming_table.go
index 22ccb30cb0..51fc9019d8 100644
--- a/plugin/advisor/pg/advisor_naming_table.go
+++ b/plugin/advisor/pg/advisor_naming_table.go
@@ -1,6 +1,3 @@
-//go:build !release
-// +build !release
-
package pg
import (
diff --git a/plugin/advisor/pg/advisor_naming_table_test.go b/plugin/advisor/pg/advisor_naming_table_test.go
index 5f9d233276..667664b90d 100644
--- a/plugin/advisor/pg/advisor_naming_table_test.go
+++ b/plugin/advisor/pg/advisor_naming_table_test.go
@@ -1,6 +1,3 @@
-//go:build !release
-// +build !release
-
package pg
import (
diff --git a/plugin/advisor/pg/advisor_syntax.go b/plugin/advisor/pg/advisor_syntax.go
index 4b3edfe43d..1c0de41125 100644
--- a/plugin/advisor/pg/advisor_syntax.go
+++ b/plugin/advisor/pg/advisor_syntax.go
@@ -1,6 +1,3 @@
-//go:build !release
-// +build !release
-
package pg
import (
diff --git a/plugin/advisor/pg/advisor_syntax_test.go b/plugin/advisor/pg/advisor_syntax_test.go
index 127903a47c..73be0d2f89 100644
--- a/plugin/advisor/pg/advisor_syntax_test.go
+++ b/plugin/advisor/pg/advisor_syntax_test.go
@@ -1,6 +1,3 @@
-//go:build !release
-// +build !release
-
package pg
import (
diff --git a/plugin/advisor/pg/advisor_table_require_pk.go b/plugin/advisor/pg/advisor_table_require_pk.go
index f82585b452..47117f062d 100644
--- a/plugin/advisor/pg/advisor_table_require_pk.go
+++ b/plugin/advisor/pg/advisor_table_require_pk.go
@@ -1,6 +1,3 @@
-//go:build !release
-// +build !release
-
package pg
import (
diff --git a/plugin/advisor/pg/advisor_table_require_pk_test.go b/plugin/advisor/pg/advisor_table_require_pk_test.go
index 966918b990..903ac8adb7 100644
--- a/plugin/advisor/pg/advisor_table_require_pk_test.go
+++ b/plugin/advisor/pg/advisor_table_require_pk_test.go
@@ -1,6 +1,3 @@
-//go:build !release
-// +build !release
-
package pg
import (
diff --git a/plugin/parser/engine/pg/convert.go b/plugin/parser/engine/pg/convert.go
index beab069a9a..83d08a962e 100644
--- a/plugin/parser/engine/pg/convert.go
+++ b/plugin/parser/engine/pg/convert.go
@@ -1,6 +1,3 @@
-//go:build !release
-// +build !release
-
package pg
import (
diff --git a/plugin/parser/engine/pg/convert_test.go b/plugin/parser/engine/pg/convert_test.go
index cb748876a2..880094d317 100644
--- a/plugin/parser/engine/pg/convert_test.go
+++ b/plugin/parser/engine/pg/convert_test.go
@@ -1,6 +1,3 @@
-//go:build !release
-// +build !release
-
package pg
import (
diff --git a/plugin/parser/engine/pg/parser.go b/plugin/parser/engine/pg/parser.go
index 634c92bb9d..b3514c0dc8 100644
--- a/plugin/parser/engine/pg/parser.go
+++ b/plugin/parser/engine/pg/parser.go
@@ -1,6 +1,3 @@
-//go:build !release
-// +build !release
-
package pg
import (