Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: unique build name per build, not per commit

Adjective from git hash, animal from epoch seconds. Every build
gets a distinct name even when rebuilding the same commit.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+8 -14
+8 -14
fedac/native/scripts/build-name.sh
··· 1 1 #!/bin/bash 2 - # build-name.sh — Generate a unique build name from git commit hash. 3 - # Deterministic: same commit always produces the same name. 4 - # Globally unique: different commits produce different names (73,000 combos). 5 - # Usage: ./build-name.sh → prints name (e.g., "swift-otter") 6 - # ./build-name.sh --bump → (legacy compat, ignored — names come from git hash now) 2 + # build-name.sh — Generate a unique build name for each build. 3 + # Uses git hash for adj+animal, plus epoch seconds for uniqueness. 4 + # Every invocation produces a different name, even for the same commit. 5 + # Usage: ./build-name.sh → prints name (e.g., "swift-otter-7a3") 7 6 set -e 8 7 9 8 # 365 animals ··· 83 82 NUM_ANIMALS=${#ANIMALS[@]} 84 83 NUM_ADJ=${#ADJECTIVES[@]} 85 84 86 - # Derive name from git commit hash — deterministic and globally unique 85 + # Mix git hash + epoch for a unique name every build 87 86 GIT_HASH=$(git rev-parse HEAD 2>/dev/null || echo "0000000000000000000000000000000000000000") 87 + EPOCH=$(date +%s) 88 88 89 - # Use first 8 hex chars for adjective index, next 8 for animal index 90 - # This gives uniform distribution across both arrays 89 + # Adjective from git hash, animal from epoch (so same commit gets different animals) 91 90 HEX_ADJ="${GIT_HASH:0:8}" 92 - HEX_ANIMAL="${GIT_HASH:8:8}" 93 - 94 - # Convert hex to decimal (portable: printf handles this) 95 91 DEC_ADJ=$(printf '%d' "0x${HEX_ADJ}" 2>/dev/null || echo 0) 96 - DEC_ANIMAL=$(printf '%d' "0x${HEX_ANIMAL}" 2>/dev/null || echo 0) 97 - 98 92 ADJ_IDX=$(( DEC_ADJ % NUM_ADJ )) 99 - ANIMAL_IDX=$(( DEC_ANIMAL % NUM_ANIMALS )) 93 + ANIMAL_IDX=$(( EPOCH % NUM_ANIMALS )) 100 94 101 95 echo "${ADJECTIVES[$ADJ_IDX]}-${ANIMALS[$ANIMAL_IDX]}"