mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 02:48:59 +00:00
Properly set build metadata
This commit is contained in:
parent
663106ef6e
commit
d4bcbe9c39
4
.github/workflows/build-syncthing.yaml
vendored
4
.github/workflows/build-syncthing.yaml
vendored
@ -16,6 +16,10 @@ env:
|
|||||||
# Avoid hilarious amounts of obscuring log output when running tests.
|
# Avoid hilarious amounts of obscuring log output when running tests.
|
||||||
LOGGER_DISCARD: "1"
|
LOGGER_DISCARD: "1"
|
||||||
|
|
||||||
|
# Our build metadata
|
||||||
|
BUILD_USER: builder
|
||||||
|
BUILD_HOST: github.syncthing.net
|
||||||
|
|
||||||
# A note on actions and third party code... The actions under actions/ (like
|
# A note on actions and third party code... The actions under actions/ (like
|
||||||
# `uses: actions/checkout`) are maintained by GitHub, and we need to trust
|
# `uses: actions/checkout`) are maintained by GitHub, and we need to trust
|
||||||
# GitHub to maintain their code and infrastructure or we're in deep shit in
|
# GitHub to maintain their code and infrastructure or we're in deep shit in
|
||||||
|
7
build.go
7
build.go
@ -1115,7 +1115,12 @@ func buildStamp() int64 {
|
|||||||
return time.Now().Unix()
|
return time.Now().Unix()
|
||||||
}
|
}
|
||||||
|
|
||||||
s, _ := strconv.ParseInt(string(bs), 10, 64)
|
s, err := strconv.ParseInt(string(bs), 10, 64)
|
||||||
|
if err != nil {
|
||||||
|
// Fall back to "now".
|
||||||
|
log.Printf("Failed to parse git output: %q: %v", string(bs), err)
|
||||||
|
return time.Now().Unix()
|
||||||
|
}
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user