Skip to content

Commit

Permalink
Add other operating systems and architectures to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
colececil committed Apr 16, 2024
1 parent 1126f1e commit 8bb2987
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ go.work

# Other
.idea/
.env
.env
bin/
17 changes: 16 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,19 @@ include .env

build:
@echo "Building windows-amd64 version..."
@GOOS=windows GOARCH=amd64 go build -ldflags '-X main.apiKey=${OPENAI_API_KEY}' -o bin/windows-amd64/summon.exe cmd/summon/summon.go
@GOOS=windows GOARCH=amd64 go build -ldflags '-X main.apiKey=${OPENAI_API_KEY}' -o bin/windows-amd64/summon.exe cmd/summon/summon.go

@echo "Building windows-arm64 version..."
@GOOS=windows GOARCH=arm64 go build -ldflags '-X main.apiKey=${OPENAI_API_KEY}' -o bin/windows-arm64/summon.exe cmd/summon/summon.go

@echo "Building macos-amd64 version..."
@GOOS=darwin GOARCH=amd64 go build -ldflags '-X main.apiKey=${OPENAI_API_KEY}' -o bin/macos-amd64/summon cmd/summon/summon.go

@echo "Building macos-arm64 version..."
@GOOS=darwin GOARCH=arm64 go build -ldflags '-X main.apiKey=${OPENAI_API_KEY}' -o bin/macos-arm64/summon cmd/summon/summon.go

@echo "Building linux-amd64 version..."
@GOOS=linux GOARCH=amd64 go build -ldflags '-X main.apiKey=${OPENAI_API_KEY}' -o bin/linux-amd64/summon cmd/summon/summon.go

@echo "Building linux-arm64 version..."
@GOOS=linux GOARCH=arm64 go build -ldflags '-X main.apiKey=${OPENAI_API_KEY}' -o bin/linux-arm64/summon cmd/summon/summon.go

0 comments on commit 8bb2987

Please sign in to comment.