mirror of
https://github.com/thegeeklab/wp-s3-action.git
synced 2024-11-22 01:00:40 +00:00
Make the builds reproducable based on commit sha
This commit is contained in:
parent
89fcebf89a
commit
0be1d32b32
3
Makefile
3
Makefile
@ -2,8 +2,9 @@
|
|||||||
|
|
||||||
EXECUTABLE ?= drone-s3-sync
|
EXECUTABLE ?= drone-s3-sync
|
||||||
IMAGE ?= plugins/$(EXECUTABLE)
|
IMAGE ?= plugins/$(EXECUTABLE)
|
||||||
|
COMMIT ?= $(shell git rev-parse --short HEAD)
|
||||||
|
|
||||||
LDFLAGS = -X "main.buildDate=$(shell date -u '+%Y-%m-%d %H:%M:%S %Z')"
|
LDFLAGS = -X "main.buildCommit=$(COMMIT)"
|
||||||
PACKAGES = $(shell go list ./... | grep -v /vendor/)
|
PACKAGES = $(shell go list ./... | grep -v /vendor/)
|
||||||
|
|
||||||
all: deps build test
|
all: deps build test
|
||||||
|
4
main.go
4
main.go
@ -24,11 +24,11 @@ type result struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
buildDate string
|
buildCommit string
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
fmt.Printf("Drone S3 Sync Plugin built at %s\n", buildDate)
|
fmt.Printf("Drone S3 Sync Plugin built from %s\n", buildCommit)
|
||||||
|
|
||||||
vargs := PluginArgs{}
|
vargs := PluginArgs{}
|
||||||
workspace := drone.Workspace{}
|
workspace := drone.Workspace{}
|
||||||
|
Loading…
Reference in New Issue
Block a user