Skip to content

Commit

Permalink
Merge branch 'release-1.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
tcrasset committed Dec 11, 2020
2 parents bb326aa + cf88ee1 commit 1a53a43
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
2 changes: 1 addition & 1 deletion brainstorm.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

One solution to having a budget for each month is to save the generic
category names and subcategory names in a data base, and have another
table for budgeted values with values
table for budgeted values with values:

- `id` #PRIMARY KEY
- `subcategory.id`
Expand Down
30 changes: 30 additions & 0 deletions bumpversion.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
set -e

PUBDIR="/home/tomc/Documents/Personal Projects/your-budget-app/"

# Find and increment the version number.
if [ $# -eq 0 ]
then
echo "Updating build number"
perl -i -pe 's/^(version:\s+)(\d+)(\.)(\d+)(\.)(\d+)(\+)(\d+)$/$1.$2.$3.$4.$5.$6.$7.($8+1)/e' "$PUBDIR/pubspec.yaml"
elif [[ $# -eq 1 && "$1" == "major" ]]
then
echo "Updating major version number"
perl -i -pe 's/^(version:\s+)(\d+)(\.)(\d+)(\.)(\d+)(\+)(\d+)$/$1.($2+1).$3.$4.$5.$6.$7.$8/e' "$PUBDIR/pubspec.yaml"
elif [[ $# -eq 1 && "$1" == "minor" ]]
then
echo "Updating minor version number"
perl -i -pe 's/^(version:\s+)(\d+)(\.)(\d+)(\.)(\d+)(\+)(\d+)$/$1.$2.$3.($4+1).$5.$6.$7.$8/e' "$PUBDIR/pubspec.yaml"
elif [[ $# -eq 1 && "$1" == "patch" ]]
then
echo "Updating patch version number"
perl -i -pe 's/^(version:\s+)(\d+)(\.)(\d+)(\.)(\d+)(\+)(\d+)$/$1.$2.$3.$4.$5.($6+1).$7.$8/e' "$PUBDIR/pubspec.yaml"
else
exit 1
fi

# Commit and tag this change.
version=`grep 'version: ' "$PUBDIR/pubspec.yaml" | sed 's/version: //'`
git commit -m "Bump version to $version" "$PUBDIR/pubspec.yaml"
git tag "$version"
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1
version: 1.0.1+1

environment:
sdk: ">=2.7.0 <3.0.0"
Expand Down

0 comments on commit 1a53a43

Please sign in to comment.