diff --git a/Cargo.lock b/Cargo.lock index 7849b79..7d531d5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1846,11 +1846,11 @@ dependencies = [ [[package]] name = "insanity-core" -version = "0.1.0" +version = "1.1.1" [[package]] name = "insanity-tui-adapter" -version = "0.1.0" +version = "1.1.1" dependencies = [ "built", "crossterm 0.23.2", @@ -1861,7 +1861,7 @@ dependencies = [ [[package]] name = "insanity-tui-app" -version = "0.1.0" +version = "1.1.1" dependencies = [ "anyhow", "argon2", diff --git a/create_release.sh b/create_release.sh new file mode 100755 index 0000000..6061f4a --- /dev/null +++ b/create_release.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Check if a version argument is provided +if [ $# -eq 0 ]; then + echo "Please provide a version number" + exit 1 +fi + +NEW_VERSION=$1 + +# Update version in Cargo.toml +cargo set-version "$NEW_VERSION" + +# Update version in flake.nix +# This assumes a specific structure in flake.nix. Adjust the sed command as needed. +sed -i "s/version = \".*\"/version = \"$NEW_VERSION\"/" flake.nix + +# Check if the sed command made changes +if ! git diff --exit-code flake.nix; then + echo "Updated version in flake.nix" +else + echo "No changes needed in flake.nix" +fi + +# Commit the changes +git add Cargo.lock **/Cargo.toml flake.nix +git commit -m "Bump version to $NEW_VERSION" + +# Create and push a new tag +git tag -a "v$NEW_VERSION" -m "Version $NEW_VERSION" +git push && git push --tags diff --git a/flake.nix b/flake.nix index 2bcce5c..d5445aa 100644 --- a/flake.nix +++ b/flake.nix @@ -33,7 +33,7 @@ packages.default = pkgs.rustPlatform.buildRustPackage { pname = "insanity"; - version = "1.1.0"; + version = "1.1.1"; src = ./.; cargoLock = { lockFile = ./Cargo.lock; diff --git a/insanity-core/Cargo.toml b/insanity-core/Cargo.toml index 381f8ca..e9e029c 100644 --- a/insanity-core/Cargo.toml +++ b/insanity-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "insanity-core" -version = "0.1.0" +version = "1.1.1" edition = "2021" [dependencies] diff --git a/insanity-native-tui-app/Cargo.toml b/insanity-native-tui-app/Cargo.toml index 8f091d5..971fd37 100644 --- a/insanity-native-tui-app/Cargo.toml +++ b/insanity-native-tui-app/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "insanity-tui-app" -version = "0.1.0" +version = "1.1.1" authors = ["Nicolas Chan "] edition = "2018" diff --git a/insanity-tui-adapter/Cargo.toml b/insanity-tui-adapter/Cargo.toml index 4d999a8..a3d4fad 100644 --- a/insanity-tui-adapter/Cargo.toml +++ b/insanity-tui-adapter/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "insanity-tui-adapter" -version = "0.1.0" +version = "1.1.1" edition = "2021" [lib]