Skip to content

Commit f95f729

Browse files
committed
更新构建
1 parent 7a761dc commit f95f729

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/go-build-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
go-version: 1.18
2828

2929
- name: install go-bindata
30-
run: sudo apt-get install go-bindata
30+
run: sudo apt-get install go-bindata rclone -y
3131

3232
- name: build assets
3333
run: go-bindata -pkg main -o inputManager.go-bindata.go inputManager.apk
@@ -60,5 +60,5 @@ jobs:
6060
6161
- name: upload to mirror
6262
run: |
63-
curl -T "go-touch-mapper_amd64" -u "${{ secrets.WEBDAV_USERNAME }}:${{ secrets.WEBDAV_PASSWORD }}" "${{ secrets.WEBDAV_ENDPOINT }}/direct/projects/go-touch-mapper/build/go-touch-mapper_amd64"
64-
curl -T "go-touch-mapper_arm64" -u "${{ secrets.WEBDAV_USERNAME }}:${{ secrets.WEBDAV_PASSWORD }}" "${{ secrets.WEBDAV_ENDPOINT }}/direct/projects/go-touch-mapper/build/go-touch-mapper_arm64"
63+
curl -T "go-touch-mapper_amd64" -u "${{ secrets.WEBDAV_USERNAME }}:${{ secrets.WEBDAV_PASSWORD }}" "${{ secrets.WEBDAV_ENDPOINT }}/build/go-touch-mapper_amd64"
64+
curl -T "go-touch-mapper_arm64" -u "${{ secrets.WEBDAV_USERNAME }}:${{ secrets.WEBDAV_PASSWORD }}" "${{ secrets.WEBDAV_ENDPOINT }}/build/go-touch-mapper_arm64"

main.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -490,10 +490,7 @@ func fileExists(filename string) bool {
490490
var configs embed.FS
491491

492492
func main() {
493-
if go_build_version == "" {
494-
go_build_version = "DEVELOPMENT BUILD"
495-
}
496-
logger.Infof("当前构建版本: %v", go_build_version)
493+
497494
parser := argparse.NewParser("go-touch-mapper", " ")
498495

499496
var configPath *string = parser.String("c", "config", &argparse.Options{
@@ -597,6 +594,11 @@ func main() {
597594
os.Exit(1)
598595
}
599596

597+
if go_build_version == "" {
598+
go_build_version = "DEVELOPMENT BUILD"
599+
}
600+
logger.Infof("当前构建版本: %v", go_build_version)
601+
600602
if *debug_mode {
601603
logger.WithDebug()
602604
logger.Debug("debug on")

0 commit comments

Comments
 (0)