diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a2e09e84cc..e33e159eb4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,25 +12,8 @@ permissions: contents: write jobs: - build-package: - runs-on: ubuntu-latest - strategy: - fail-fast: false - steps: - - name: Set up Go 1.x.y - uses: actions/setup-go@v4 - with: - go-version: ${{ env.GO_VERSION }} - - - name: Checkout codebase - uses: actions/checkout@v3 - - - name: Build Package - run: | - make build goreleaser: runs-on: ubuntu-latest - needs: build-package steps: - uses: actions/checkout@v3 with: diff --git a/.goreleaser.yml b/.goreleaser.yml index 40ccbb1a4d..f631e67522 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -34,9 +34,9 @@ builds: - amd64 ldflags: - -s -w - - -X github.com/easegress-io/easegress/v2/pkg/version.RELEASE={{ .Tag }} - - -X github.com/easegress-io/easegress/v2/pkg/version.COMMIT={{.Commit}} - - -X github.com/easegress-io/easegress/v2/pkg/version.REPO=chainbase-labs/easegress-providerproxy + - -X github.com/megaease/easegress/v2/pkg/version.RELEASE={{ .Tag }} + - -X github.com/megaease/easegress/v2/pkg/version.COMMIT={{.Commit}} + - -X github.com/megaease/easegress/v2/pkg/version.REPO=chainbase-labs/easegress-providerproxy - id: builder main: cmd/builder/main.go @@ -49,9 +49,9 @@ builds: - amd64 ldflags: - -s -w - - -X github.com/easegress-io/easegress/v2/pkg/version.RELEASE={{ .Tag }} - - -X github.com/easegress-io/easegress/v2/pkg/version.COMMIT={{.Commit}} - - -X github.com/easegress-io/easegress/v2/pkg/version.REPO=chainbase-labs/easegress-providerproxy + - -X github.com/megaease/easegress/v2/pkg/version.RELEASE={{ .Tag }} + - -X github.com/megaease/easegress/v2/pkg/version.COMMIT={{.Commit}} + - -X github.com/megaease/easegress/v2/pkg/version.REPO=chainbase-labs/easegress-providerproxy - id: server main: cmd/server/main.go @@ -64,9 +64,9 @@ builds: - amd64 ldflags: - -s -w - - -X github.com/easegress-io/easegress/v2/pkg/version.RELEASE={{ .Tag }} - - -X github.com/easegress-io/easegress/v2/pkg/version.COMMIT={{.Commit}} - - -X github.com/easegress-io/easegress/v2/pkg/version.REPO=chainbase-labs/easegress-providerproxy + - -X github.com/megaease/easegress/v2/pkg/version.RELEASE={{ .Tag }} + - -X github.com/megaease/easegress/v2/pkg/version.COMMIT={{.Commit}} + - -X github.com/megaease/easegress/v2/pkg/version.REPO=chainbase-labs/easegress-providerproxy archives: - id: easegress diff --git a/Makefile b/Makefile index 0a9956bb4b..9e4a38e7f6 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ IMAGE_NAME?=h00000000s/easegress BUILDER_IMAGE_NAME?=megaease/golang:1.21.7-alpine # Version -RELEASE?=v2.7.3-rc1 +RELEASE?=$${RELEASE:-$(shell git describe --tags)} # Git Related GIT_REPO_INFO=$(shell cd ${MKFILE_DIR} && git config --get remote.origin.url) diff --git a/pkg/filters/proxies/providerproxy/providerproxy.go b/pkg/filters/proxies/providerproxy/providerproxy.go index 25410b7848..315b275a39 100644 --- a/pkg/filters/proxies/providerproxy/providerproxy.go +++ b/pkg/filters/proxies/providerproxy/providerproxy.go @@ -34,14 +34,12 @@ type ( ) func (m *ProviderProxy) SelectNode() (*url.URL, error) { - if m.providerSelector == nil { urls := m.spec.Urls randomIndex := rand.Intn(len(urls)) rpcUrl := urls[randomIndex] return url.Parse(rpcUrl) } - rpcUrl, err := m.providerSelector.ChooseServer() if err != nil { return nil, err diff --git a/scripts/install.sh b/scripts/install.sh index 2ff106788d..8a65cd0717 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -35,7 +35,7 @@ fi GITHUB_URL=https://github.com/chainbase-labs/easegress-providerproxy LATEST_RELEASE=$(curl -L -s -H 'Accept: application/json' ${GITHUB_URL}/releases/latest) LATEST_VERSION=$(echo $LATEST_RELEASE | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/') -ARTIFACT="easegress-${LATEST_VERSION}-${OS}-${ARCH}.tar.gz" +ARTIFACT="easegress-providerproxy-${LATEST_VERSION}-${OS}-${ARCH}.tar.gz" ARTIFACT_URL="${GITHUB_URL}/releases/download/${LATEST_VERSION}/${ARTIFACT}"