Skip to content

Commit

Permalink
fix build ci (#2)
Browse files Browse the repository at this point in the history
* feat: support rpc provider proxy

* feat: etcd default prefix namaepsace

* feat: block number selector

* fix: remove namespace prefix

* feat: from git log get version

* fix: update artifact name

* fix: set version

* fix: set version
  • Loading branch information
AlanViast authored Oct 11, 2024
1 parent dc8b18d commit ac6a86e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 30 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
18 changes: 9 additions & 9 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions pkg/filters/proxies/providerproxy/providerproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"


Expand Down

0 comments on commit ac6a86e

Please sign in to comment.