From de0c1c91ad8cd0016331b848403b8937f0875784 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Mon, 25 Oct 2021 09:32:28 +0530 Subject: [PATCH] Added support for arm64 in install.sh (#209) * Added install.sh script for arm Signed-off-by: Yuvraj --- .github/workflows/build.yaml | 11 +++++------ .github/workflows/release.yml | 3 +++ .goreleaser.yml | 27 ++++++++++++++++++++++++--- install.sh | 6 +++--- 4 files changed, 35 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 25759ecc17..03b19ecd88 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -20,18 +20,19 @@ jobs: ~/.cache/go-build ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} + - uses: actions/setup-go@v2 + with: + go-version: '1.16' - name: Run GoReleaser dry run uses: goreleaser/goreleaser-action@v2 with: version: latest args: --snapshot --skip-publish --rm-dist - name: Unit Tests - uses: cedrickring/golang-action@1.5.2 env: GO111MODULE: "on" CI_ENV: "true" - with: - args: make install && make test_unit_without_flag + run: make install && make test_unit_without_flag - name: Push CodeCov uses: codecov/codecov-action@v1.0.5 with: @@ -39,8 +40,6 @@ jobs: flags: unittests fail_ci_if_error: true - name: Lint - uses: cedrickring/golang-action@1.5.2 env: GO111MODULE: "on" - with: - args: make install && make lint + run: make install && make lint diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1e4c78aa08..7137ab353c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,6 +14,9 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: "0" + - uses: actions/setup-go@v2 + with: + go-version: '1.16' - name: Run GoReleaser dry run uses: goreleaser/goreleaser-action@v2 with: diff --git a/.goreleaser.yml b/.goreleaser.yml index 6d326f33ce..17e2499506 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -6,10 +6,33 @@ builds: - CGO_ENABLED=0 main: ./main.go binary: flytectl + id: flytectl-darwin + goos: + - darwin + goarch: + - arm64 + - amd64 + ldflags: + - -s -w -X github.com/flyteorg/flytestdlib/version.Version={{.Version}} -X github.com/flyteorg/flytestdlib/version.Build={{.ShortCommit}} -X github.com/flyteorg/flytestdlib/version.BuildTime={{.Date}} + - env: + - CGO_ENABLED=0 + main: ./main.go + binary: flytectl + id: flytectl-linux goos: - linux + goarch: + - arm64 + - amd64 + ldflags: + - -s -w -X github.com/flyteorg/flytestdlib/version.Version={{.Version}} -X github.com/flyteorg/flytestdlib/version.Build={{.ShortCommit}} -X github.com/flyteorg/flytestdlib/version.BuildTime={{.Date}} + - env: + - CGO_ENABLED=0 + main: ./main.go + binary: flytectl + id: flytectl-windows + goos: - windows - - darwin ldflags: - -s -w -X github.com/flyteorg/flytestdlib/version.Version={{.Version}} -X github.com/flyteorg/flytestdlib/version.Build={{.ShortCommit}} -X github.com/flyteorg/flytestdlib/version.BuildTime={{.Date}} archives: @@ -23,8 +46,6 @@ archives: format_overrides: - goos: windows format: zip -universal_binaries: - - replace: false checksum: name_template: 'checksums.txt' snapshot: diff --git a/install.sh b/install.sh index 150ae277af..57860ba297 100755 --- a/install.sh +++ b/install.sh @@ -1,6 +1,6 @@ #!/bin/sh set -e -# Code generated by godownloader on 2021-04-03T07:49:04Z. DO NOT EDIT. +# Code generated by godownloader on 2021-10-24T11:29:26Z. DO NOT EDIT. # usage() { @@ -62,10 +62,10 @@ execute() { } get_binaries() { case "$PLATFORM" in - darwin/386) BINARIES="flytectl" ;; darwin/amd64) BINARIES="flytectl" ;; - linux/386) BINARIES="flytectl" ;; + darwin/arm64) BINARIES="flytectl" ;; linux/amd64) BINARIES="flytectl" ;; + linux/arm64) BINARIES="flytectl" ;; windows/386) BINARIES="flytectl" ;; windows/amd64) BINARIES="flytectl" ;; *)