v2.0 — Pipeline Architecture - Frame, CodecResult, Codec trait, Pipeline builder - 6 adapters: Passthrough, Dedup, Compress, Pacer, Slicer, Stats v2.1 — Multi-frame & new codecs - CodecOutput::Many fan-out, EncryptCodec, FilterCodec - Codec::reset(), encode_all/decode_all, real SlicerCodec chunking v2.2 — Observability & reassembly - PipelineResult (frames+errors+consumed), StageMetric - ReassemblyCodec, ConditionalCodec, Pipeline presets & metrics v2.3 — Integrity & rate control - ChecksumCodec (CRC32), RateLimitCodec (token bucket), TagCodec - Pipeline::chain(), Pipeline::describe() 13 codec adapters, 474 tests (all green, 0 regressions)
43 lines
1.7 KiB
Bash
Executable file
43 lines
1.7 KiB
Bash
Executable file
#!/bin/bash
|
||
echo "=== Forgejo Repository Setup ==="
|
||
echo "This will create the 'dreamstack' repository and push your code."
|
||
echo ""
|
||
read -p "Forgejo Username: " USERNAME
|
||
read -s -p "Forgejo Password: " PASSWORD
|
||
echo ""
|
||
echo "--------------------------------"
|
||
|
||
# Create repository using Basic Auth
|
||
echo "Creating repository 'dreamstack' under @$USERNAME..."
|
||
HTTP_STATUS=$(curl -s -o /tmp/repo_response.json -w "%{http_code}" -u "$USERNAME:$PASSWORD" -X POST https://registry.spaceoperator.org/api/v1/user/repos -H "Content-Type: application/json" -d '{"name": "dreamstack", "private": false}')
|
||
|
||
if [ "$HTTP_STATUS" -eq 201 ] || [ "$HTTP_STATUS" -eq 200 ]; then
|
||
echo "✅ Repository created successfully!"
|
||
elif grep -q "repository already exists" /tmp/repo_response.json; then
|
||
echo "ℹ️ Repository already exists, proceeding to push..."
|
||
else
|
||
echo "❌ Failed to create repository (HTTP $HTTP_STATUS)"
|
||
cat /tmp/repo_response.json
|
||
echo ""
|
||
exit 1
|
||
fi
|
||
|
||
# Set up git remote and push
|
||
echo "Pushing code to Forgejo..."
|
||
cd /home/amir/code/dreamstack || exit 1
|
||
|
||
# Encode password for URL to prevent issues with special characters
|
||
# (Simple approach for git remote)
|
||
git remote remove origin 2>/dev/null
|
||
git remote add origin "https://$USERNAME:$PASSWORD@registry.spaceoperator.org/$USERNAME/dreamstack.git"
|
||
|
||
echo "Pushing main branch..."
|
||
git push -u origin main
|
||
if [ $? -ne 0 ]; then
|
||
echo "Pushing master branch instead..."
|
||
git push -u origin master
|
||
fi
|
||
|
||
# Clean up credentials from remote URL to leave working copy secure
|
||
git remote set-url origin "https://registry.spaceoperator.org/$USERNAME/dreamstack.git"
|
||
echo "✅ Done! Your code is now pushed to https://registry.spaceoperator.org/$USERNAME/dreamstack"
|