diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3451131..a796c85 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,5 @@ name: release -run-name: Release ${{ github.ref_name }} +run-name: ${{ github.ref_name }} - Release on: push: tags: diff --git a/build.sh b/build.sh index 4e1b2f6..58b477e 100755 --- a/build.sh +++ b/build.sh @@ -1,11 +1,19 @@ #!/bin/sh -VERSION=$(git describe --tags) +VERSION=$2 + +if [ -z "$VERSION" ]; then + VERSION=$(git describe --tags) +fi + +echo $VERSION +exit BUILD=$(date +%FT%T%z) LD_FLAGS="-X main.Version=$VERSION -X main.Build=$BUILD" +wails=$(which wails) case $1 in "desktop") - CGO_ENABLED=0 wails build -ldflags="$LD_FLAGS" + CGO_ENABLED=0 $wails build -ldflags="$LD_FLAGS" ;; "server") CGO_ENABLED=0 go build -ldflags="$LD_FLAGS" ./cmd/server @@ -15,7 +23,7 @@ case $1 in cd frontend && pnpm install && pnpm build ;; "dev") - wails dev -ldflags="$LD_FLAGS" -loglevel "Error" + $wails dev -ldflags="$LD_FLAGS" -loglevel "Error" ;; *) ;; diff --git a/frontend/wailsjs/runtime/package.json b/frontend/wailsjs/runtime/package.json old mode 100644 new mode 100755 diff --git a/frontend/wailsjs/runtime/runtime.d.ts b/frontend/wailsjs/runtime/runtime.d.ts old mode 100644 new mode 100755 diff --git a/frontend/wailsjs/runtime/runtime.js b/frontend/wailsjs/runtime/runtime.js old mode 100644 new mode 100755 diff --git a/packaging/PKGBUILD b/packaging/PKGBUILD index 94eebd7..99d0e33 100644 --- a/packaging/PKGBUILD +++ b/packaging/PKGBUILD @@ -29,13 +29,15 @@ prepare() { export GOPATH=/tmp/go export GOBIN=/tmp/go/bin go install github.com/wailsapp/wails/v2/cmd/wails@latest + npm i -g pnpm@latest } build() { cd "$pkgname-$pkgver" export GOPATH=/tmp/go export GOBIN=/tmp/go/bin - /tmp/go/bin/wails build + export PATH=$GOBIN:$PATH + ./build.sh desktop $pkgver } check() {