dreamstack/setup_forgejo.sh
enzotar 35b39a1cf1 feat(ds-stream): v2.0-2.3 composable codec pipeline
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)
2026-03-11 23:50:35 -07:00

43 lines
1.7 KiB
Bash
Executable file
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/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"