From f152b022303a3afbbfcd6328c48621c46924f099 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Wed, 11 Jan 2023 12:19:35 -0800 Subject: [PATCH 1/2] Build Ids for Android, Windows, and Mac Builds --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 2ee6370..992d2ad 100644 --- a/Makefile +++ b/Makefile @@ -20,19 +20,19 @@ libCwtch.so: lib.go libCwtch.x64.dylib: lib.go ./switch-ffi.sh - go build -ldflags "-X main.buildVer=$(shell git describe --tags) -X main.buildDate=$(shell git log -1 --format=%cd --date=format:%G-%m-%d-%H-%M)" -buildmode c-shared -o libCwtch.x64.dylib + go build -ldflags "-buildid=$(shell git describe --tags) -X main.buildVer=$(shell git describe --tags) -X main.buildDate=$(shell git log -1 --format=%cd --date=format:%G-%m-%d-%H-%M)" -buildmode c-shared -o libCwtch.x64.dylib libCwtch.arm64.dylib: lib.go ./switch-ffi.sh - env GOARCH=arm64 GOOS=darwin CGO_ENABLED=1 go build -ldflags "-X main.buildVer=$(shell git describe --tags) -X main.buildDate=$(shell git log -1 --format=%cd --date=format:%G-%m-%d-%H-%M)" -buildmode c-shared -o libCwtch.arm64.dylib + env GOARCH=arm64 GOOS=darwin CGO_ENABLED=1 go build -ldflags "-buildid=$(shell git describe --tags) -X main.buildVer=$(shell git describe --tags) -X main.buildDate=$(shell git log -1 --format=%cd --date=format:%G-%m-%d-%H-%M)" -buildmode c-shared -o libCwtch.arm64.dylib cwtch.aar: lib.go ./switch-gomobile.sh - gomobile bind -target android/arm,android/arm64,android/amd64 -ldflags="-X cwtch.buildVer=$(shell git describe --tags) -X cwtch.buildDate=$(shell git log -1 --format=%cd --date=format:%G-%m-%d-%H-%M)" + gomobile bind -target android/arm,android/arm64,android/amd64 -ldflags="-buildid=$(shell git describe --tags) -X cwtch.buildVer=$(shell git describe --tags) -X cwtch.buildDate=$(shell git log -1 --format=%cd --date=format:%G-%m-%d-%H-%M)" libCwtch.dll: lib.go ./switch-ffi.sh - GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc-win32 go build -ldflags "-X main.buildVer=$(shell git describe --tags) -X main.buildDate=$(shell git log -1 --format=%cd --date=format:%G-%m-%d-%H-%M)" -buildmode c-shared -o libCwtch.dll + GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc-win32 go build -ldflags "-buildid=$(shell git describe --tags) -X main.buildVer=$(shell git describe --tags) -X main.buildDate=$(shell git log -1 --format=%cd --date=format:%G-%m-%d-%H-%M)" -buildmode c-shared -o libCwtch.dll clean: rm -f cwtch.aar cwtch_go.apk libCwtch.h libCwtch.so cwtch-sources.jar libCwtch.dll libCwtch.dylib -- 2.25.1 From 1baac147d7c30618a29be1bbac42a3188fcd799d Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Wed, 11 Jan 2023 13:15:06 -0800 Subject: [PATCH 2/2] Update Windows Docker ref --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 8389456..bbddebf 100644 --- a/.drone.yml +++ b/.drone.yml @@ -52,7 +52,7 @@ steps: - make android - name: build-windows - image: openpriv/mingw-go:2022.11 + image: openpriv/mingw-go:2023.01 environment: GOPATH: /go volumes: -- 2.25.1