-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Grant Linville <[email protected]>
- Loading branch information
1 parent
51cc4c9
commit 7fd4baf
Showing
3 changed files
with
97 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,32 @@ | ||
VERSION=$(shell git describe --tags --always --dirty) | ||
|
||
# Build target for darwin and linux for both amd64 and arm64 | ||
build: | ||
CGO_ENABLED=0 go build -o bin/gptscript-go-tool -ldflags "-s -w" | ||
@echo "Building for darwin and linux..." | ||
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w" -o credential-darwin-amd64 ./... | ||
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags "-s -w" -o credential-darwin-arm64 ./... | ||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o credential-linux-amd64 ./... | ||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "-s -w" -o credential-linux-arm64 ./... | ||
|
||
# Build target for windows for both amd64 and arm64 | ||
build-windows: | ||
@echo "Building for windows..." | ||
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -o credential-windows-amd64.exe ./... | ||
CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build -ldflags "-s -w" -o credential-windows-arm64.exe ./... | ||
|
||
checksums: | ||
@echo "Creating checksums..." | ||
sha256sum -b credential-* > checksums.txt | ||
sha256sum -c --strict checksums.txt | ||
|
||
# Clean up binaries | ||
clean: | ||
@echo "Cleaning up..." | ||
rm -f credential-darwin-amd64 | ||
rm -f credential-darwin-arm64 | ||
rm -f credential-linux-amd64 | ||
rm -f credential-linux-arm64 | ||
rm -f credential-windows-amd64.exe | ||
rm -f credential-windows-arm64.exe | ||
|
||
.PHONY: build build-windows clean |