We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e91a03 commit 24d02adCopy full SHA for 24d02ad
magefile.go
@@ -14,6 +14,7 @@ import (
14
"path/filepath"
15
"regexp"
16
"runtime"
17
+ "strconv"
18
"strings"
19
"time"
20
@@ -100,6 +101,14 @@ func Clean() error {
100
101
102
func flags() string {
103
timestamp := time.Now().Format(time.RFC3339)
104
+ source_date_epoch := os.Getenv("SOURCE_DATE_EPOCH")
105
+ if source_date_epoch != "" {
106
+ sde, err := strconv.ParseInt(source_date_epoch, 10, 64)
107
+ if err != nil {
108
+ panic(fmt.Sprintf("Invalid SOURCE_DATE_EPOCH: %s", err))
109
+ }
110
+ timestamp = time.Unix(sde, 0).UTC().Format(time.RFC3339)
111
112
hash := hash()
113
tag := tag()
114
if tag == "" {
0 commit comments