From 9e3eb7fcb39436df58f79ca0c63a70608a5f7161 Mon Sep 17 00:00:00 2001 From: Tom Crasset Date: Fri, 11 Dec 2020 21:07:01 +0100 Subject: [PATCH 1/3] Create script bumping version --- bumpversion.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 bumpversion.sh diff --git a/bumpversion.sh b/bumpversion.sh new file mode 100755 index 00000000..68291e31 --- /dev/null +++ b/bumpversion.sh @@ -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" From 5e876c1218318f4cb083824d127de1b43c18f437 Mon Sep 17 00:00:00 2001 From: Tom Crasset Date: Fri, 11 Dec 2020 21:14:28 +0100 Subject: [PATCH 2/3] Add colon : --- brainstorm.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brainstorm.md b/brainstorm.md index 1d129914..7ec29280 100644 --- a/brainstorm.md +++ b/brainstorm.md @@ -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` From cf88ee15e7083cd581f764bdf059a56a78218edf Mon Sep 17 00:00:00 2001 From: Tom Crasset Date: Fri, 11 Dec 2020 21:16:21 +0100 Subject: [PATCH 3/3] Bump version to 1.0.1+1 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 49d168d6..a607a563 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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"