Skip to content

Commit 7f53390

Browse files
committed
fix(build): version lost
1 parent e83f8e1 commit 7f53390

File tree

3 files changed

+30
-31
lines changed

3 files changed

+30
-31
lines changed

.github/workflows/beta_release.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Beta Release builds
22

33
on:
44
push:
5-
branches: [ 'main' ]
5+
branches: ["main"]
66
workflow_dispatch:
77

88
concurrency:
@@ -16,8 +16,8 @@ jobs:
1616
changelog:
1717
strategy:
1818
matrix:
19-
platform: [ ubuntu-latest ]
20-
go-version: [ '1.21' ]
19+
platform: [ubuntu-latest]
20+
go-version: ["1.21"]
2121
name: Beta Release Changelog
2222
runs-on: ${{ matrix.platform }}
2323
steps:
@@ -65,17 +65,17 @@ jobs:
6565
strategy:
6666
matrix:
6767
include:
68-
- target: '!(*musl*|*windows-arm64*|*android*|*freebsd*)' # xgo
68+
- target: "!(*musl*|*windows-arm64*|*android*|*freebsd*)" # xgo
6969
hash: "md5"
70-
- target: 'linux-!(arm*)-musl*' #musl-not-arm
70+
- target: "linux-!(arm*)-musl*" #musl-not-arm
7171
hash: "md5-linux-musl"
72-
- target: 'linux-arm*-musl*' #musl-arm
72+
- target: "linux-arm*-musl*" #musl-arm
7373
hash: "md5-linux-musl-arm"
74-
- target: 'windows-arm64' #win-arm64
74+
- target: "windows-arm64" #win-arm64
7575
hash: "md5-windows-arm64"
76-
- target: 'android-*' #android
76+
- target: "android-*" #android
7777
hash: "md5-android"
78-
- target: 'freebsd-*' #freebsd
78+
- target: "freebsd-*" #freebsd
7979
hash: "md5-freebsd"
8080

8181
name: Beta Release
@@ -89,7 +89,7 @@ jobs:
8989
- name: Setup Go
9090
uses: actions/setup-go@v5
9191
with:
92-
go-version: '1.22'
92+
go-version: "1.22"
9393

9494
- name: Setup web
9595
run: bash build.sh dev web
@@ -105,19 +105,19 @@ jobs:
105105
output: openlist-$target$ext
106106
musl-base-url: "https://github.com/OpenListTeam/musl-compilers/releases/latest/download/"
107107
x-flags: |
108-
github.com/OpenListTeam/OpenList/internal/conf.BuiltAt=$built_at
109-
github.com/OpenListTeam/OpenList/internal/conf.GitAuthor=OpenList
110-
github.com/OpenListTeam/OpenList/internal/conf.GitCommit=$git_commit
111-
github.com/OpenListTeam/OpenList/internal/conf.Version=$tag
112-
github.com/OpenListTeam/OpenList/internal/conf.WebVersion=dev
108+
github.com/OpenListTeam/OpenList/v4/internal/conf.BuiltAt=$built_at
109+
github.com/OpenListTeam/OpenList/v4/internal/conf.GitAuthor=OpenList
110+
github.com/OpenListTeam/OpenList/v4/internal/conf.GitCommit=$git_commit
111+
github.com/OpenListTeam/OpenList/v4/internal/conf.Version=$tag
112+
github.com/OpenListTeam/OpenList/v4/internal/conf.WebVersion=dev
113113
114114
- name: Compress
115115
run: |
116116
bash build.sh zip ${{ matrix.hash }}
117117
env:
118118
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
119119

120-
# See above
120+
# See above
121121
- name: Upload assets to beta release
122122
uses: softprops/action-gh-release@v2
123123
with:

.github/workflows/build.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Test Build
22

33
on:
44
push:
5-
branches: [ 'main' ]
5+
branches: ["main"]
66
pull_request:
7-
branches: [ 'main' ]
7+
branches: ["main"]
88
workflow_dispatch:
99

1010
concurrency:
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
platform: [ubuntu-latest]
19-
target:
19+
target:
2020
- darwin-amd64
2121
- darwin-arm64
2222
- windows-amd64
@@ -27,7 +27,6 @@ jobs:
2727
name: Build
2828
runs-on: ${{ matrix.platform }}
2929
steps:
30-
3130
- name: Checkout
3231
uses: actions/checkout@v4
3332

@@ -37,7 +36,7 @@ jobs:
3736
- name: Setup Go
3837
uses: actions/setup-go@v5
3938
with:
40-
go-version: '1.22'
39+
go-version: "1.22"
4140

4241
- name: Setup web
4342
run: bash build.sh dev web
@@ -51,11 +50,11 @@ jobs:
5150
musl-target-format: $os-$musl-$arch
5251
out-dir: build
5352
x-flags: |
54-
github.com/OpenListTeam/OpenList/internal/conf.BuiltAt=$built_at
55-
github.com/OpenListTeam/OpenList/internal/conf.GitAuthor=OpenList
56-
github.com/OpenListTeam/OpenList/internal/conf.GitCommit=$git_commit
57-
github.com/OpenListTeam/OpenList/internal/conf.Version=$tag
58-
github.com/OpenListTeam/OpenList/internal/conf.WebVersion=dev
53+
github.com/OpenListTeam/OpenList/v4/internal/conf.BuiltAt=$built_at
54+
github.com/OpenListTeam/OpenList/v4/internal/conf.GitAuthor=OpenList
55+
github.com/OpenListTeam/OpenList/v4/internal/conf.GitCommit=$git_commit
56+
github.com/OpenListTeam/OpenList/v4/internal/conf.Version=$tag
57+
github.com/OpenListTeam/OpenList/v4/internal/conf.WebVersion=dev
5958
6059
- name: Upload artifact
6160
uses: actions/upload-artifact@v4

build.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ fi
3838

3939
ldflags="\
4040
-w -s \
41-
-X 'github.com/OpenListTeam/OpenList/internal/conf.BuiltAt=$builtAt' \
42-
-X 'github.com/OpenListTeam/OpenList/internal/conf.GitAuthor=$gitAuthor' \
43-
-X 'github.com/OpenListTeam/OpenList/internal/conf.GitCommit=$gitCommit' \
44-
-X 'github.com/OpenListTeam/OpenList/internal/conf.Version=$version' \
45-
-X 'github.com/OpenListTeam/OpenList/internal/conf.WebVersion=$webVersion' \
41+
-X 'github.com/OpenListTeam/OpenList/v4/internal/conf.BuiltAt=$builtAt' \
42+
-X 'github.com/OpenListTeam/OpenList/v4/internal/conf.GitAuthor=$gitAuthor' \
43+
-X 'github.com/OpenListTeam/OpenList/v4/internal/conf.GitCommit=$gitCommit' \
44+
-X 'github.com/OpenListTeam/OpenList/v4/internal/conf.Version=$version' \
45+
-X 'github.com/OpenListTeam/OpenList/v4/internal/conf.WebVersion=$webVersion' \
4646
"
4747

4848
FetchWebDev() {

0 commit comments

Comments
 (0)