fix: sign script uses date-based version to avoid conflicts
Old approach: increment patch by 1 each time. Failed when the same patch number was already signed with Mozilla from a previous session. New approach: version is 1.MMDD.HHMM (e.g., 1.326.1542). Guaranteed unique per minute, all parts under 65535. https://claude.ai/code/session_01Dvgwe7XMoSxnWXkih8p1Cw
This commit is contained in:
+6
-4
@@ -20,10 +20,12 @@ if [ ! -f "$ENV_FILE" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# --- Auto-bump patch version ---
|
# --- Auto-bump version — always unique ---
|
||||||
CURRENT_VERSION=$(grep -o '"version": "[^"]*"' "$MANIFEST" | head -1 | grep -o '[0-9.]*')
|
# Format: MAJOR.YMMDD.HHMM (e.g., 1.60326.1542)
|
||||||
IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT_VERSION"
|
# Each part stays under 65535, guaranteed unique per minute
|
||||||
PATCH=$((PATCH + 1))
|
MAJOR=1
|
||||||
|
MINOR=$(date +%-m%d) # e.g., 326 for March 26, 1225 for Dec 25
|
||||||
|
PATCH=$(date +%-H%M) # e.g., 1542 for 3:42 PM
|
||||||
NEW_VERSION="$MAJOR.$MINOR.$PATCH"
|
NEW_VERSION="$MAJOR.$MINOR.$PATCH"
|
||||||
|
|
||||||
echo "Version: $CURRENT_VERSION → $NEW_VERSION"
|
echo "Version: $CURRENT_VERSION → $NEW_VERSION"
|
||||||
|
|||||||
Reference in New Issue
Block a user