Skip to content

Commit 6fe49d6

Browse files
authored
Merge pull request #28 from sarus-suite/fix-opensuse-15.6-build
Fix opensuse 15.6 build
2 parents e6c5e0c + fc9ac65 commit 6fe49d6

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

.github/workflows/release-opensuse156.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Release opensuse 15.6 amd64 and arm64
22

33
on:
4-
push:
4+
push:
55
tags:
66
- 'v*.*.*'
77

@@ -59,13 +59,15 @@ jobs:
5959
GOFLAGS: "-buildvcs=false"
6060
GO_LDFLAGS: "-linkmode external"
6161
CGO_LDFLAGS: "-g -O2"
62-
VERSION_LDFLAGS: "-X parallax/common.Version=${{ github.ref_name }} \
63-
-X parallax/common.Commit=${{ github.sha }} \
64-
-X parallax/common.BuildDate=$(date -u +%Y-%m-%dT%H:%M:%SZ)"
6562
run: |
6663
mkdir -p dist
64+
BUILD_DATE="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
65+
6766
go build -v -x \
68-
-ldflags "$GO_LDFLAGS $VERSION_LDFLAGS" \
67+
-ldflags "$GO_LDFLAGS \
68+
-X=parallax/common.Version=${{ github.ref_name }} \
69+
-X=parallax/common.Commit=${{ github.sha }} \
70+
-X=parallax/common.BuildDate=${BUILD_DATE}" \
6971
-o dist/parallax-${{ github.ref_name }}-opensuse-15.6-${{ matrix.arch }} \
7072
.
7173

.github/workflows/release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,15 @@ jobs:
5959
GOFLAGS: "-buildvcs=false"
6060
GO_LDFLAGS: "-linkmode external"
6161
CGO_LDFLAGS: "-g -O2"
62-
VERSION_LDFLAGS: "-X parallax/common.Version=${{ github.ref_name }} \
63-
-X parallax/common.Commit=${{ github.sha }} \
64-
-X parallax/common.BuildDate=$(date -u +%Y-%m-%dT%H:%M:%SZ)"
6562
run: |
6663
mkdir -p dist
64+
BUILD_DATE="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
65+
6766
go build -v -x \
68-
-ldflags "$GO_LDFLAGS $VERSION_LDFLAGS" \
67+
-ldflags "$GO_LDFLAGS \
68+
-X=parallax/common.Version=${{ github.ref_name }} \
69+
-X=parallax/common.Commit=${{ github.sha }} \
70+
-X=parallax/common.BuildDate=${BUILD_DATE}" \
6971
-o dist/parallax-${{ github.ref_name }}-opensuse-15.5-${{ matrix.arch }} \
7072
.
7173

0 commit comments

Comments
 (0)