add CICD
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
2024-06-28 09:02:31 +10:00
parent 24560ee8bf
commit bfa2afbb6c
2 changed files with 45 additions and 0 deletions

15
.drone.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
# disable CGO for cross-compiling
export CGO_ENABLED=0
export now=$(TZ=Australia/Sydney date '+%Y%m%d-%H%M%S')
echo $now
#pwd
#ls -lah ~
#go env
echo "build commences"
go build -ldflags "-X main.sha1ver=`git rev-parse HEAD` -X main.buildTime=$now" -o json2excel
echo "build complete"
sha256sum json2excel > json2excel_checksum.txt
ls -lah