mirror of
https://github.com/openfaas/faas.git
synced 2025-06-18 12:06:37 +00:00
Remove git commit message from binary
This appears to have broken CI at least three times now and prevented us from shipping a release binary for a tag. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
@ -42,7 +42,6 @@ jobs:
|
||||
build-args: |
|
||||
VERSION=${{ steps.get_tag.outputs.TAG }}
|
||||
GIT_COMMIT=${{ github.sha }}
|
||||
GIT_COMMIT_MESSAGE=${{ steps.get_commit_message.outputs.commit_message }}
|
||||
tags: |
|
||||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/gateway:${{ steps.get_tag.outputs.TAG }}
|
||||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/gateway:${{ github.sha }}
|
||||
|
1
.github/workflows/publish.yml
vendored
1
.github/workflows/publish.yml
vendored
@ -45,7 +45,6 @@ jobs:
|
||||
build-args: |
|
||||
VERSION=${{ steps.get_tag.outputs.TAG }}
|
||||
GIT_COMMIT=${{ github.sha }}
|
||||
GIT_COMMIT_MESSAGE="${{ steps.get_commit_message.outputs.commit_message }}"
|
||||
tags: |
|
||||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/gateway:${{ steps.get_tag.outputs.TAG }}
|
||||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/gateway:${{ github.sha }}
|
||||
|
@ -11,7 +11,6 @@ ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
|
||||
ARG GIT_COMMIT
|
||||
ARG GIT_COMMIT_MESSAGE
|
||||
ARG VERSION
|
||||
|
||||
COPY --from=license-check /license-check /usr/bin/
|
||||
@ -45,7 +44,6 @@ RUN go test $(go list ./... | grep -v integration | grep -v /vendor/ | grep -v /
|
||||
|
||||
RUN CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build --ldflags "-s -w \
|
||||
-X \"github.com/openfaas/faas/gateway/version.GitCommitSHA=${GIT_COMMIT}\" \
|
||||
-X \"github.com/openfaas/faas/gateway/version.GitCommitMessage=${GIT_COMMIT_MESSAGE}\" \
|
||||
-X \"github.com/openfaas/faas/gateway/version.Version=${VERSION}\" \
|
||||
-X github.com/openfaas/faas/gateway/types.Arch=${TARGETARCH}" \
|
||||
-a -installsuffix cgo -o gateway .
|
||||
|
@ -26,11 +26,9 @@ const NameExpression = "-a-zA-Z_0-9."
|
||||
|
||||
func main() {
|
||||
if len(version.GitCommitMessage) == 0 {
|
||||
version.GitCommitMessage = "Place-holder for commit message"
|
||||
version.GitCommitMessage = "See GitHub for latest changes"
|
||||
}
|
||||
|
||||
// log.Printf("Commit: %s", version.GitCommitMessage)
|
||||
|
||||
osEnv := types.OsEnv{}
|
||||
readConfig := types.ReadConfig{}
|
||||
config, configErr := readConfig.Read(osEnv)
|
||||
|
Reference in New Issue
Block a user