rogerscuall / aws-router

MIT License
1 stars 0 forks source link

GOOS and GOARCH for Mac with Apple Sillicon #1

Closed lsotodev closed 2 years ago

lsotodev commented 2 years ago

GOOS and GOARCH for Mac with Apple Sillicon

Context:

With the introduction of Apple Silicon (a.k.a. the M1 chip), on go version 1.16 or later:

  • darwin/amd64 means macOS with Intel CPU
  • darwin/arm64 updates to mean macOS with Apple Silicon CPU

Task:

https://github.com/rogerscuall/aws-router/blob/05633e7991e2bb58a4566985afa8f75d31975de4/Taskfile.yaml#L13-L21

with:

 build: 
   cmds: 
     - GOOS=darwin GOARCH=arm64 go build -o awsrouters-m1 *.go 
  buildMacIntel: 
   cmds: 
     - GOOS=darwin GOARCH=amd64 go build -o awsrouters-intel *.go
 buildWindows: 
   cmds: 
     - GOOS=windows GOARCH=amd64 go build -o awsrouters.exe *.go 
 buildLinux: 
   cmds: 
     - GOOS=linux GOARCH=amd64 go build -o awsrouters-linux

Acceptance criterial:

Allow build for the follow 4 OS/Arch convention:

cc: @rogerscuall, @lsotodev

rogerscuall commented 2 years ago

The space is not needed, right? GOOS=darwin GOARCH=arm64 go build -o awsrouters-m1 *.go @lsotodev

lsotodev commented 2 years ago

@rogerscuall Right. The space is not necessary. It was a typo. I corrected it. Thanks!