Skip to content

Commit

Permalink
Merge pull request #100 from alegrey91/ci/change-build
Browse files Browse the repository at this point in the history
ci: change build method
  • Loading branch information
alegrey91 authored Apr 2, 2024
2 parents e8e8ae2 + 581ec1d commit 7ee3559
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
check-latest: true
- run: go version
- name: build
run: make build
run: make build-gh
- uses: anchore/sbom-action@78fc58e266e87a38d4194b2137a3d4e9bcaf7ca1 # v0.14.3
with:
artifact-name: fwdctl-sbom.spdx.json
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ endif
go mod download
go build \
-v \
-ldflags="-s -w -X 'github.com/alegrey91/fwdctl/internal/constants.Version=${GITHUB_REF_NAME }'" \
-ldflags='-s -w -X "github.com/alegrey91/fwdctl/internal/constants.Version=${GITHUB_REF_NAME}"' \
-o ${BINARY_DIR}/${BINARY_NAME} \
.

Expand Down
9 changes: 0 additions & 9 deletions install
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@ if [ ! -f "$BINARY_RELEASE_NAME" ]; then
fi
printf "[download succeded]\n"

file_checksum=$(cat $CHECKSUMS | grep -w "$BINARY_RELEASE_NAME" | cut -d " " -f1)
binary_checksum=$(sha256sum $BINARY_RELEASE_NAME | cut -d " " -f1)
# check if checksum is consistent
if [ "$file_checksum" != "$binary_checksum" ]; then
printf "Binary has been tampered!\n"
exit 1
fi
printf "[checksum succeded]\n"

# install binary
chmod +x "$BINARY_RELEASE_NAME"
mv "$BINARY_RELEASE_NAME" "/usr/local/bin/$BINARY_NAME"
Expand Down

0 comments on commit 7ee3559

Please sign in to comment.