From e306a467290b86dce6df330a4d983ae622fe592a Mon Sep 17 00:00:00 2001 From: James Foster Date: Mon, 14 Apr 2025 10:28:24 -0700 Subject: [PATCH] Update deploy notes. --- README.md | 13 ++++++++++--- extras/device_client/lib/model/version.dart | 2 +- extras/scripts/pre-commit | 2 ++ src/Version.h | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 091932a60..a3f9949c5 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,16 @@ Arduino library for the Open Acidification pH Stat Controller * Use [`extras/scripts/install.sh`](extras/scripts/install.sh) to do the initial install. * After that use [`extras/scripts/testAndBuild.sh`](extras/scripts/testAndBuild.sh) to test. - * See [this video](https://youtu.be/ZYNnVE4LnCg) for an install and test example. -* Push a tag with 'v' in order to build a release - * Use Ansible to install on [oap.cs.wallawalla.edu](oap.cs.wallawalla.edu). + * See [this video](https://youtu.be/ZYNnVE4LnCg) for an install and test example. +* Release Process + * Update the version files to a new version (e.g., v25.4.1) + * Create a _local_ tag on the _previous_ commit + * Commit _only_ the version files to avoid edits to the version files (see `extras/scripts/pre-commit`) + * Push and merge the commit + * Fetch and move the local main to upstream main + * Move the tag to the merged commit with the version file changes + * Push the tag to origin and upstream + * Use Ansible to install on [oap.cs.wallawalla.edu](oap.cs.wallawalla.edu). * To build the GUI simulator, see [GUI/build.sh](GUI/build.sh). * Use the [`extras/scripts/tasks.json`](extras/scripts/tasks.json) file to easily start the development servers in Visual Studio Code. * Copy the JSON file to your [`.vscode`](.vscode) directory diff --git a/extras/device_client/lib/model/version.dart b/extras/device_client/lib/model/version.dart index e6b3708d1..917f6589e 100644 --- a/extras/device_client/lib/model/version.dart +++ b/extras/device_client/lib/model/version.dart @@ -1 +1 @@ -const String gitVersion = 'v25.4.1 '; +const String gitVersion = 'v25.4.1 +'; diff --git a/extras/scripts/pre-commit b/extras/scripts/pre-commit index 3e1ad245b..5a67e516c 100755 --- a/extras/scripts/pre-commit +++ b/extras/scripts/pre-commit @@ -1,5 +1,7 @@ +# Create a tag before committing and then move the tag to the commit (yes, a bit of a hack!) version=`git describe --tags` version="$version " +# if the only change is in Version.h or version.dart, don't add the + to the version changes=`git diff --name-only --cached | grep -v "Version.h" | grep -v "version.dart" | wc -l | xargs` if [[ "$changes" == "0" ]] then diff --git a/src/Version.h b/src/Version.h index 27999391f..64a455f6f 100644 --- a/src/Version.h +++ b/src/Version.h @@ -1 +1 @@ -#define VERSION "v25.4.1 " +#define VERSION "v25.4.1 +"