Skip to content

Commit

Permalink
better testing experience
Browse files Browse the repository at this point in the history
  • Loading branch information
matryer committed Mar 11, 2021
1 parent 871a58c commit 4905e00
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ app/.DS_Store
xbarapp.com/public/.DS_Store
app/assets/mac/info.plist
tools/sitegen/.version
app/.version
5 changes: 3 additions & 2 deletions app/main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
_ "embed"
"fmt"
"os"

Expand All @@ -10,8 +11,8 @@ import (
"github.com/wailsapp/wails/v2/pkg/options/mac"
)

// version is the xbar version (set by the git tag in build.sh).
var version string = "dev"
//go:embed .version
var version string

func main() {
println("xbar", version)
Expand Down
1 change: 1 addition & 0 deletions app/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ VERSION=`git describe --tags`
echo ""
echo " xbar ${VERSION}..."
echo ""
echo -n $VERSION > .version

# run all tests
./test.sh
Expand Down
3 changes: 3 additions & 0 deletions app/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -e

VERSION=`git describe --tags`

go test

cd ../pkg/metadata
Expand All @@ -17,6 +19,7 @@ go test
cd ../../app

cd ../tools/sitegen
echo -n $VERSION > .version
go test -short
cd ../../app

Expand Down

0 comments on commit 4905e00

Please sign in to comment.