mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 00:53:16 +08:00
Automate version bumps
This commit is contained in:
parent
670b769f82
commit
4821ab8597
3
.gitignore
vendored
3
.gitignore
vendored
@ -15,4 +15,5 @@ examples/**/example*
|
||||
!examples/**/*.*
|
||||
cmd/wails/wails
|
||||
.DS_Store
|
||||
tmp
|
||||
tmp
|
||||
dist
|
26
.goreleaser.yml
Normal file
26
.goreleaser.yml
Normal file
@ -0,0 +1,26 @@
|
||||
# This is an example goreleaser.yaml file with some sane defaults.
|
||||
# Make sure to check the documentation at http://goreleaser.com
|
||||
before:
|
||||
hooks:
|
||||
- ./scripts/updateversion.sh
|
||||
builds:
|
||||
- env:
|
||||
- CGO_ENABLED=0
|
||||
main: ./cmd/wails/main.go
|
||||
archive:
|
||||
replacements:
|
||||
darwin: Darwin
|
||||
linux: Linux
|
||||
windows: Windows
|
||||
386: i386
|
||||
amd64: x86_64
|
||||
checksum:
|
||||
name_template: 'checksums.txt'
|
||||
snapshot:
|
||||
name_template: "{{ .Tag }}-next"
|
||||
changelog:
|
||||
sort: asc
|
||||
filters:
|
||||
exclude:
|
||||
- '^docs:'
|
||||
- '^test:'
|
@ -1,5 +1,4 @@
|
||||
package cmd
|
||||
|
||||
// Version - Wails version
|
||||
// ...oO(There must be a better way)
|
||||
const Version = "v0.10.0"
|
||||
|
8
scripts/updateversion.sh
Executable file
8
scripts/updateversion.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
TAG=$(git describe --abbrev=0 --tags)
|
||||
cat << EOF > cmd/version.go
|
||||
package cmd
|
||||
|
||||
// Version - Wails version
|
||||
const Version = "${TAG}"
|
||||
EOF
|
Loading…
Reference in New Issue
Block a user