Skip to content

Commit

Permalink
chore: semver tagging & embedding
Browse files Browse the repository at this point in the history
  • Loading branch information
alexVinarskis committed Sep 17, 2023
1 parent 2039504 commit 354e74c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Build
on:
pull_request:
push:
tags:
- '*'
branches:
- master
- '*package*'
Expand Down
7 changes: 5 additions & 2 deletions package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ ICON_PATH="/opt/$PACKAGE/icon"
APP_PATH="/opt/$PACKAGE"
APP_DIR="./package$APP_PATH"
DEB_DIR="./package/DEBIAN"
TAG=$(date '+%Y%m%d-%H%M%S')-$(git rev-parse --short HEAD)
VERSION="0.1.0-${TAG}"
VERSION=$(git describe --tags)+$(date '+%Y%m%d-%H%M%S')

# Bake in app name and version tag
sed -i "s|applicationName".*"|applicationName = '${NAME}';|g" ./lib/configs/constants.dart
sed -i "s|applicationVersion".*"|applicationVersion = '${VERSION}';|g" ./lib/configs/constants.dart

rm -rf ./package
mkdir -p "$APP_DIR"
Expand Down

0 comments on commit 354e74c

Please sign in to comment.