Bump install.sh version to use self-documenting ISO8601 date
This commit is contained in:
@@ -14,7 +14,7 @@ Alternatively, you can do it manually by following these steps:
|
||||
- [ ] Update ./apps/server/Shared/AliasVault.Shared.Core/AppInfo.cs and update major/minor/patch to the new version. This version will be shown in the client and admin app footer. This version should be equal to the git release tag.
|
||||
- [ ] Update ./apps/server/Shared/AliasVault.Shared.Core/AppInfo.cs with the minimum supported client versions.
|
||||
- Only required if new API output breaks earlier client versions and/or this version of the client/API will upgrade the client vault model to a new major version.
|
||||
- [ ] Update ./install.sh `@version` in header ONLY if the install script content has changed since the last release. This allows the install script to self-update when running the `./install.sh update` command on default installations.
|
||||
- [ ] Update ./install.sh `@version` number in header ONLY if the install script content has changed since the last release. Increment the number by 1. This allows the install script to self-update when running the `./install.sh update` command on default installations. Note: This is a simple build number (not semver) that is independent of the release version - only increment it when install.sh actually changes.
|
||||
|
||||
## Versioning browser extensions
|
||||
- [ ] Update `./apps/browser-extension/wxt.config.ts` with the new version for the extension. This will be shown in the browser extension web stores. This version should be equal to the git release tag.
|
||||
|
||||
+17
-27
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# @version 0.25.2
|
||||
# @version 20260128
|
||||
|
||||
# Repository information used for downloading files and images from GitHub
|
||||
REPO_OWNER="aliasvault"
|
||||
@@ -2413,39 +2413,28 @@ handle_update() {
|
||||
handle_install_version "$latest_version"
|
||||
}
|
||||
|
||||
# Function to extract version
|
||||
# Function to extract build number from install.sh
|
||||
# Supports both @version (current) and @build (future) formats
|
||||
extract_version() {
|
||||
local file="$1"
|
||||
local version=$(head -n 2 "$file" | grep '@version' | cut -d' ' -f3)
|
||||
# Try @version first (current format), then @build (future format)
|
||||
local version=$(head -n 2 "$file" | grep -E '@(version|build)' | cut -d' ' -f3)
|
||||
echo "$version"
|
||||
}
|
||||
|
||||
# Function to compare semantic versions
|
||||
# Function to compare build numbers
|
||||
# Returns: 1 if version1 > version2, -1 if version1 < version2, 0 if equal
|
||||
compare_versions() {
|
||||
local version1="$1"
|
||||
local version2="$2"
|
||||
|
||||
# Split versions into arrays
|
||||
IFS='.' read -ra v1_parts <<< "$version1"
|
||||
IFS='.' read -ra v2_parts <<< "$version2"
|
||||
|
||||
# Compare each part numerically
|
||||
for i in {0..2}; do
|
||||
# Default to 0 if part doesn't exist
|
||||
local v1_part=${v1_parts[$i]:-0}
|
||||
local v2_part=${v2_parts[$i]:-0}
|
||||
|
||||
# Compare numerically
|
||||
if [ "$v1_part" -gt "$v2_part" ]; then
|
||||
echo "1" # version1 is greater
|
||||
return
|
||||
elif [ "$v1_part" -lt "$v2_part" ]; then
|
||||
echo "-1" # version1 is lesser
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
echo "0" # versions are equal
|
||||
if [ "$version1" -gt "$version2" ] 2>/dev/null; then
|
||||
echo "1"
|
||||
elif [ "$version1" -lt "$version2" ] 2>/dev/null; then
|
||||
echo "-1"
|
||||
else
|
||||
echo "0"
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to check if install.sh needs updating
|
||||
@@ -2512,9 +2501,10 @@ check_install_script_update() {
|
||||
exit 0
|
||||
fi
|
||||
|
||||
printf "${YELLOW}> A new version of the install script is available (${new_version}).${NC}\n"
|
||||
printf "${YELLOW}> A new install script update is available.${NC}\n"
|
||||
printf "It is recommended to update to ensure compatibility.\n"
|
||||
printf "\n"
|
||||
printf "Would you like to update the install script? [Y/n]: "
|
||||
printf "Update now? [Y/n]: "
|
||||
read -r reply
|
||||
|
||||
if [[ ! $reply =~ ^[Nn]$ ]]; then
|
||||
|
||||
@@ -560,7 +560,7 @@ echo "--------------------------------"
|
||||
|
||||
if [[ "$MARKETING_UPDATE" == true ]]; then
|
||||
# Install.sh reminder (only for version changes)
|
||||
echo "• If you've made changes to install.sh since the last release, remember to update its @version in the header to match this release version ($version)."
|
||||
echo "• If you've made changes to install.sh since the last release, remember to increment its @version number in the header."
|
||||
|
||||
# Only create changelog files for GA releases (not alpha, beta, or rc)
|
||||
if [[ -z "$version_suffix" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user