5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 04:59:38 +08:00

Automate version bumps

This commit is contained in:
Lea Anthony 2019-03-10 17:02:12 +11:00
parent 670b769f82
commit 4821ab8597
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405
4 changed files with 36 additions and 2 deletions

1
.gitignore vendored
View File

@ -16,3 +16,4 @@ examples/**/example*
cmd/wails/wails
.DS_Store
tmp
dist

26
.goreleaser.yml Normal file
View 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:'

View File

@ -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
View 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