Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build drone for mac with m1 chip #186

Merged
merged 5 commits into from
Jun 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .drone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ GOOS=linux GOARCH=ppc64le go build -ldflags "-X main.version=${DRONE_TAG##v}"
GOOS=linux GOARCH=arm go build -ldflags "-X main.version=${DRONE_TAG##v}" -o release/linux/arm/drone ./drone
GOOS=windows GOARCH=amd64 go build -ldflags "-X main.version=${DRONE_TAG##v}" -o release/windows/amd64/drone.exe ./drone
GOOS=darwin GOARCH=amd64 go build -ldflags "-X main.version=${DRONE_TAG##v}" -o release/darwin/amd64/drone ./drone
GOOS=darwin GOARCH=arm64 go build -ldflags "-X main.version=${DRONE_TAG##v}" -o release/darwin/arm64/drone ./drone

# tar binary files prior to upload
tar -cvzf release/drone_linux_amd64.tar.gz -C release/linux/amd64 drone
Expand All @@ -20,6 +21,7 @@ tar -cvzf release/drone_linux_ppc64le.tar.gz -C release/linux/ppc64le drone
tar -cvzf release/drone_linux_arm.tar.gz -C release/linux/arm drone
tar -cvzf release/drone_windows_amd64.tar.gz -C release/windows/amd64 drone.exe
tar -cvzf release/drone_darwin_amd64.tar.gz -C release/darwin/amd64 drone
tar -cvzf release/drone_darwin_arm64.tar.gz -C release/darwin/arm64 drone

# generate shas for tar files
sha256sum release/*.tar.gz > release/drone_checksums.txt
2 changes: 1 addition & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: default

steps:
- name: build
image: golang:1.13
image: golang:1.16
commands:
- sh .drone.sh

Expand Down
2 changes: 1 addition & 1 deletion BUILDING
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
1. Clone the repository
2. Install go 1.13 or later with Go modules enabled
2. Install go 1.16 or later with Go modules enabled
3. Install binaries to $GOPATH/bin

go install ./...
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/drone/drone-cli

go 1.13
go 1.16

replace github.com/docker/docker => github.com/docker/engine v17.12.0-ce-rc1.0.20200309214505-aa6a9891b09c+incompatible

Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ github.com/docker/go-connections v0.3.0 h1:3lOnM9cSzgGwx8VfK/NGOW5fLQ0GjIlCkaktF
github.com/docker/go-connections v0.3.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
github.com/docker/go-units v0.3.3 h1:Xk8S3Xj5sLGlG5g67hJmYMmUgXv5N4PhkjJHHqrwnTk=
github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/drone/drone-go v1.5.0 h1:4rM74O3Xd6SnkdRIidlwwhVAPs4dXvcdVCgGvkrqL1M=
github.com/drone/drone-go v1.5.0/go.mod h1:fxCf9jAnXDZV1yDr0ckTuWd1intvcQwfJmTRpTZ1mXg=
github.com/drone/drone-go v1.6.1-0.20210601150845-c0e5325523a6 h1:mLEgDgep0et7hQCm76xH3xkuMAQb92JYT+0HKQk/loM=
github.com/drone/drone-go v1.6.1-0.20210601150845-c0e5325523a6/go.mod h1:fxCf9jAnXDZV1yDr0ckTuWd1intvcQwfJmTRpTZ1mXg=
github.com/drone/drone-runtime v1.0.7-0.20190729070836-38f28a11afe8/go.mod h1:+osgwGADc/nyl40J0fdsf8Z09bgcBZXvXXnLOY48zYs=
Expand Down