Modified - [scripts] [smart-build] [artifacts] Renamed smart-build outputs to include the tag/ref and generated per-file SHA-256 checksums.
- 1 - I updated [`.smart-build.sh`](/config/workspace/gitea-dev/gitea/.smart-build.sh) so each build artifact is now written as `gitea-<tag-or-ref>-<os>-<platform><-sqlite>` with the original executable extension preserved, and each output also gets its own adjacent `.sha256` file generated with `sha256sum` or `shasum -a 256`. (cherry picked from commitc6f2b32f0b) (cherry picked from commitbff70ba3de)
This commit is contained in:
@@ -783,3 +783,6 @@ History search guidance:
|
|||||||
- 1 - I renamed the bootstrap admin actor label and the related immutable-account locale key from `good` to `god` in the admin grant helpers and admin users UI flow.
|
- 1 - I renamed the bootstrap admin actor label and the related immutable-account locale key from `good` to `god` in the admin grant helpers and admin users UI flow.
|
||||||
- 2 - I updated the admin API and admin-panel restriction messages, tests, and both English and Romanian locale strings so bootstrap-protected accounts are consistently labeled as `GOD`-granted.
|
- 2 - I updated the admin API and admin-panel restriction messages, tests, and both English and Romanian locale strings so bootstrap-protected accounts are consistently labeled as `GOD`-granted.
|
||||||
- 3 - I updated the matching historical task descriptions in `.codex-history.md` so the earlier admin-policy entries now use the corrected `GOD` terminology.
|
- 3 - I updated the matching historical task descriptions in `.codex-history.md` so the earlier admin-policy entries now use the corrected `GOD` terminology.
|
||||||
|
|
||||||
|
156 - [2026-05-17 18:14:08] - v1.26.0-by-petru-24-gadb90b3453 - Type: Modified - [scripts] [smart-build] [artifacts] Renamed smart-build outputs to include the tag/ref and generated per-file SHA-256 checksums.
|
||||||
|
- 1 - I updated [`.smart-build.sh`](/config/workspace/gitea-dev/gitea/.smart-build.sh) so each build artifact is now written as `gitea-<tag-or-ref>-<os>-<platform><-sqlite>` with the original executable extension preserved, and each output also gets its own adjacent `.sha256` file generated with `sha256sum` or `shasum -a 256`.
|
||||||
|
|||||||
+43
-6
@@ -12,6 +12,37 @@ export NVM_DIR="$HOME/.nvm"
|
|||||||
# Forțează folosirea versiunii 22
|
# Forțează folosirea versiunii 22
|
||||||
nvm use 22 > /dev/null 2>&1 || echo "⚠️ NVM nu a putut activa Node 22 automatically."
|
nvm use 22 > /dev/null 2>&1 || echo "⚠️ NVM nu a putut activa Node 22 automatically."
|
||||||
|
|
||||||
|
resolve_build_ref() {
|
||||||
|
git describe --tags --exact-match 2>/dev/null || git describe --tags --always
|
||||||
|
}
|
||||||
|
|
||||||
|
write_sha256_file() {
|
||||||
|
local artifact_path="$1"
|
||||||
|
local artifact_dir artifact_name
|
||||||
|
|
||||||
|
artifact_dir="$(dirname "$artifact_path")"
|
||||||
|
artifact_name="$(basename "$artifact_path")"
|
||||||
|
|
||||||
|
if command -v sha256sum > /dev/null 2>&1; then
|
||||||
|
(
|
||||||
|
cd "$artifact_dir" || exit 1
|
||||||
|
sha256sum "$artifact_name" > "$artifact_name.sha256"
|
||||||
|
)
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if command -v shasum > /dev/null 2>&1; then
|
||||||
|
(
|
||||||
|
cd "$artifact_dir" || exit 1
|
||||||
|
shasum -a 256 "$artifact_name" > "$artifact_name.sha256"
|
||||||
|
)
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "❌ Neither sha256sum nor shasum is available for checksum generation."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
# --- 1. VERIFICARE INTEGRITATE ȘI CURĂȚARE CACHE INIȚIALĂ ---
|
# --- 1. VERIFICARE INTEGRITATE ȘI CURĂȚARE CACHE INIȚIALĂ ---
|
||||||
echo "🔍 Initialization checks..."
|
echo "🔍 Initialization checks..."
|
||||||
|
|
||||||
@@ -192,6 +223,10 @@ if [ -z "$BUILD_VARIANT" ]; then
|
|||||||
BUILD_VARIANT="default"
|
BUILD_VARIANT="default"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
BUILD_REF="$(resolve_build_ref)"
|
||||||
|
BUILD_REF="${BUILD_REF//\//-}"
|
||||||
|
echo "🏷️ Build tag/reference: $BUILD_REF"
|
||||||
|
|
||||||
bindata_needs_update() {
|
bindata_needs_update() {
|
||||||
local source_dir="$1"
|
local source_dir="$1"
|
||||||
local bindata_file="$2"
|
local bindata_file="$2"
|
||||||
@@ -238,14 +273,14 @@ ensure_bindata_assets
|
|||||||
mkdir -p dist
|
mkdir -p dist
|
||||||
for TARGET in "${TARGETS[@]}"; do
|
for TARGET in "${TARGETS[@]}"; do
|
||||||
IFS="/" read -r OS ARCH ARM_VER <<< "$TARGET"
|
IFS="/" read -r OS ARCH ARM_VER <<< "$TARGET"
|
||||||
|
|
||||||
EXT="" && [ "$OS" == "windows" ] && EXT=".exe"
|
EXT="" && [ "$OS" == "windows" ] && EXT=".exe"
|
||||||
SUFFIX="-$OS-$ARCH" && [ ! -z "$ARM_VER" ] && SUFFIX="-$OS-armv$ARM_VER"
|
PLATFORM="$ARCH" && [ ! -z "$ARM_VER" ] && PLATFORM="armv$ARM_VER"
|
||||||
VARIANT_SUFFIX="" && [ "$BUILD_VARIANT" == "sqlite" ] && VARIANT_SUFFIX="-sqlite"
|
VARIANT_SUFFIX="" && [ "$BUILD_VARIANT" == "sqlite" ] && VARIANT_SUFFIX="-sqlite"
|
||||||
OUTPUT="dist/gitea$SUFFIX$VARIANT_SUFFIX$EXT"
|
OUTPUT="dist/gitea-$BUILD_REF-$OS-$PLATFORM$VARIANT_SUFFIX$EXT"
|
||||||
|
|
||||||
echo "📦 Building for $OS/$ARCH ${ARM_VER:+(v$ARM_VER) }with TAGS=\"$BUILD_TAGS\"..."
|
echo "📦 Building for $OS/$ARCH ${ARM_VER:+(v$ARM_VER) }with TAGS=\"$BUILD_TAGS\"..."
|
||||||
|
|
||||||
export GOOS=$OS
|
export GOOS=$OS
|
||||||
export GOARCH=$ARCH
|
export GOARCH=$ARCH
|
||||||
export GOARM=$ARM_VER
|
export GOARM=$ARM_VER
|
||||||
@@ -253,15 +288,17 @@ for TARGET in "${TARGETS[@]}"; do
|
|||||||
if [ "$BUILD_VARIANT" == "sqlite" ]; then
|
if [ "$BUILD_VARIANT" == "sqlite" ]; then
|
||||||
export CGO_ENABLED=1
|
export CGO_ENABLED=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if make build TAGS="$BUILD_TAGS"; then
|
if make build TAGS="$BUILD_TAGS"; then
|
||||||
mv "gitea$EXT" "$OUTPUT"
|
mv "gitea$EXT" "$OUTPUT"
|
||||||
|
write_sha256_file "$OUTPUT"
|
||||||
echo "✅ Created: $OUTPUT"
|
echo "✅ Created: $OUTPUT"
|
||||||
|
echo "✅ Created: $OUTPUT.sha256"
|
||||||
else
|
else
|
||||||
echo "❌ Fail to build for $TARGET"
|
echo "❌ Fail to build for $TARGET"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unset GOOS GOARCH GOARM
|
unset GOOS GOARCH GOARM
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user