From 0832f90b05be3e7c58a76d9f63a05c179817a617 Mon Sep 17 00:00:00 2001 From: Mark Randall Havens Date: Mon, 9 Jun 2025 07:35:30 -0500 Subject: [PATCH 01/12] =?UTF-8?q?Codeberg=20metadata=20link=20commit=20at?= =?UTF-8?q?=202025-06-09=2007:35:30=20=E2=80=94=20https://codeberg.org/mrh?= =?UTF-8?q?avens/git-sigil/commit/2f0763496109f75cab814d5e81aafc70cfc1f38e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitfield/codeberg.sigil.md | 59 +++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .gitfield/codeberg.sigil.md diff --git a/.gitfield/codeberg.sigil.md b/.gitfield/codeberg.sigil.md new file mode 100644 index 0000000..ab294cd --- /dev/null +++ b/.gitfield/codeberg.sigil.md @@ -0,0 +1,59 @@ +# ๐Ÿ”— Codeberg Repository Link + +- **Repo Name**: `git-sigil` +- **Codeberg User**: `mrhavens` +- **Remote URL**: [https://codeberg.org/mrhavens/git-sigil](https://codeberg.org/mrhavens/git-sigil) +- **Local Repo Path**: `/home/mrhavens/fieldcraft/git-sigil` +- **Remote Label**: `codeberg` +- **Default Branch**: `master` +- **Repo Created**: `2025-06-09 07:35:30` + +--- + +## ๐Ÿ“ฆ Commit Info + +- **This Commit Timestamp**: `2025-06-09 07:35:30` +- **Last Commit SHA**: `2f0763496109f75cab814d5e81aafc70cfc1f38e` +- **Last Commit Message**: `Forgejo metadata link commit at 2025-06-07 01:41:24 โ€” https://remember.thefoldwithin.earth/mrhavens/git-sigil/commit/16d01e72de5a17d8c5f33ea89591b34335c42bd5` +- **Last Commit Author**: `Mark Randall Havens ` +- **Last Commit Date**: `Sat Jun 7 01:41:32 2025 -0500` +- **This Commit URL**: [https://codeberg.org/mrhavens/git-sigil/commit/2f0763496109f75cab814d5e81aafc70cfc1f38e](https://codeberg.org/mrhavens/git-sigil/commit/2f0763496109f75cab814d5e81aafc70cfc1f38e) + +--- + +## ๐Ÿ“Š Repo Status + +- **Total Commits**: `894` +- **Tracked Files**: `115` +- **Uncommitted Changes**: `No` +- **Latest Tag**: `None` + +--- + +## ๐Ÿงญ Environment + +- **Host Machine**: `DESKTOP-E5SGI58` +- **Current User**: `mrhavens` +- **Time Zone**: `CDT` +- **Script Version**: `1.0` + +--- + +## ๐Ÿงฌ Hardware & OS Fingerprint + +- **OS Name**: `Linux` +- **OS Version**: `Ubuntu 24.04.2 LTS` +- **Kernel Version**: `5.15.167.4-microsoft-standard-WSL2` +- **Architecture**: `x86_64` +- **Running in Docker**: `No` +- **Running in WSL**: `Yes` +- **Virtual Machine**: `wsl` +- **System Uptime**: `up 9 hours, 55 minutes` +- **MAC Address**: `00:15:5d:3d:32:5b` +- **Local IP**: `172.18.207.124` +- **CPU Model**: `AMD A6-3420M APU with Radeon(tm) HD Graphics` +- **Total RAM (GB)**: `3.63` + +--- + +_Auto-generated by `gitfield-codeberg` push script._ From a004ffa2fa34a7da8b530050b7c7ab9e1984a565 Mon Sep 17 00:00:00 2001 From: Mark Randall Havens Date: Mon, 9 Jun 2025 07:38:33 -0500 Subject: [PATCH 02/12] =?UTF-8?q?Local=20metadata=20link=20commit=20at=202?= =?UTF-8?q?025-06-09=2007:38:32=20=E2=80=94=20file:///home/mrhavens/git-lo?= =?UTF-8?q?cal-repos/git-sigil.git?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitfield/local.sigil.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.gitfield/local.sigil.md b/.gitfield/local.sigil.md index 58b3961..d405654 100644 --- a/.gitfield/local.sigil.md +++ b/.gitfield/local.sigil.md @@ -3,28 +3,28 @@ - **Repo Name**: `git-sigil` - **Local User**: `mrhavens` - **Remote URL**: `file:///home/mrhavens/git-local-repos/git-sigil.git` -- **Local Repo Path**: `/mnt/c/Downloads/git-sigil` +- **Local Repo Path**: `/home/mrhavens/fieldcraft/git-sigil` - **Remote Label**: `local` - **Default Branch**: `master` -- **Repo Created**: `2025-06-07 01:40:33` +- **Repo Created**: `2025-06-09 07:38:32` --- ## ๐Ÿ“ฆ Commit Info -- **This Commit Timestamp**: `2025-06-07 01:40:33` -- **Last Commit SHA**: `d1bdac6f11d212a1bd25043d848dbf603577ab21` -- **Last Commit Message**: `Post-GitHub sync at 2025-06-07 01:33:38` +- **This Commit Timestamp**: `2025-06-09 07:38:32` +- **Last Commit SHA**: `0832f90b05be3e7c58a76d9f63a05c179817a617` +- **Last Commit Message**: `Codeberg metadata link commit at 2025-06-09 07:35:30 โ€” https://codeberg.org/mrhavens/git-sigil/commit/2f0763496109f75cab814d5e81aafc70cfc1f38e` - **Last Commit Author**: `Mark Randall Havens ` -- **Last Commit Date**: `Sat Jun 7 01:40:32 2025 -0500` +- **Last Commit Date**: `Mon Jun 9 07:35:30 2025 -0500` - **This Commit URL**: `file:///home/mrhavens/git-local-repos/git-sigil.git` --- ## ๐Ÿ“Š Repo Status -- **Total Commits**: `889` -- **Tracked Files**: `115` +- **Total Commits**: `895` +- **Tracked Files**: `116` - **Uncommitted Changes**: `No` - **Latest Tag**: `None` @@ -48,8 +48,8 @@ - **Running in Docker**: `No` - **Running in WSL**: `Yes` - **Virtual Machine**: `wsl` -- **System Uptime**: `up 23 hours, 48 minutes` -- **MAC Address**: `00:15:5d:86:d8:cc` +- **System Uptime**: `up 9 hours, 58 minutes` +- **MAC Address**: `00:15:5d:3d:32:5b` - **Local IP**: `172.18.207.124` - **CPU Model**: `AMD A6-3420M APU with Radeon(tm) HD Graphics` - **Total RAM (GB)**: `3.63` From e4aa1cdc982adab7f786d62cc59516ff6574fe8a Mon Sep 17 00:00:00 2001 From: Mark Randall Havens Date: Mon, 9 Jun 2025 07:38:33 -0500 Subject: [PATCH 03/12] Post-Local sync at 2025-06-09 07:38:32 --- .gitfield/push_log.json | 6 + .gitfield/pushed.log | 1 + bin/gitfield-codeberg | 261 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 268 insertions(+) create mode 100755 bin/gitfield-codeberg diff --git a/.gitfield/push_log.json b/.gitfield/push_log.json index 27db871..26f092c 100644 --- a/.gitfield/push_log.json +++ b/.gitfield/push_log.json @@ -176,6 +176,12 @@ "branch": "master", "commit": "d1bdac6f11d212a1bd25043d848dbf603577ab21", "message": "Post-GitHub sync at 2025-06-07 01:33:38" + }, + { + "timestamp": "2025-06-09 07:38:32", + "branch": "master", + "commit": "0832f90b05be3e7c58a76d9f63a05c179817a617", + "message": "Codeberg metadata link commit at 2025-06-09 07:35:30 โ€” https://codeberg.org/mrhavens/git-sigil/commit/2f0763496109f75cab814d5e81aafc70cfc1f38e" } ] } diff --git a/.gitfield/pushed.log b/.gitfield/pushed.log index 79427ca..ac0dad2 100644 --- a/.gitfield/pushed.log +++ b/.gitfield/pushed.log @@ -160,3 +160,4 @@ [2025-06-07 01:41:15] Radicle: RID=rad:z3FEj7rF8gZw9eFksCuiN43qjzrex, Peer ID=z6Mkw5s3ppo26C7y7tGK5MD8n2GqTHS582PPpeX5Xqbu2Mpz CLI: rad inspect rad:z3FEj7rF8gZw9eFksCuiN43qjzrex # View project details CLI: git ls-tree -r --name-only HEAD # View file structure +[2025-06-09 07:38:33] Local: diff --git a/bin/gitfield-codeberg b/bin/gitfield-codeberg new file mode 100755 index 0000000..3bed6bc --- /dev/null +++ b/bin/gitfield-codeberg @@ -0,0 +1,261 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + +# Configuration +GIT_REMOTE_NAME="codeberg" +CODEBERG_DOMAIN="codeberg.org" +CODEBERG_SSH="git@$CODEBERG_DOMAIN" +CODEBERG_SSH_PORT="22" +CODEBERG_API="https://$CODEBERG_DOMAIN/api/v1" +USERNAME="mrhavens" +REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null) || { echo "[ERROR] Not inside a git repository. Please run this script from within a git repository." >&2; exit 1; } +REPO_NAME=$(basename "$REPO_ROOT") || { echo "[ERROR] Failed to get repository name" >&2; exit 1; } +MARKDOWN_FILE="$REPO_ROOT/.gitfield/codeberg.sigil.md" +DEFAULT_NAME="Mark Randall Havens" +DEFAULT_EMAIL="mark.r.havens@gmail.com" +TOKEN_FILE="$HOME/.codeberg_token" +SCRIPT_VERSION="1.0" + +# Logging functions +info() { echo -e "\e[1;34m[INFO]\e[0m $*"; } +warn() { echo -e "\e[1;33m[WARN]\e[0m $*"; } +error() { echo -e "\e[1;31m[ERROR]\e[0m $*" >&2; exit 1; } + +# Check for required tools +info "Checking for required tools..." +for cmd in git curl jq ssh lsb_release; do + command -v "$cmd" >/dev/null || { + sudo apt update -qq || warn "Failed to update package lists, continuing..." + sudo apt install -y git curl jq openssh-client lsb-release || error "Failed to install $cmd" + } +done + +# Handle Codeberg token +RESET_TOKEN=false +if [[ "${1:-}" == "--reset-token" ]]; then + RESET_TOKEN=true + rm -f "$TOKEN_FILE" 2>/dev/null || warn "Failed to remove token file" + info "Token reset requested." +fi + +if [[ -f "$TOKEN_FILE" && "$RESET_TOKEN" == false ]]; then + TOKEN=$(cat "$TOKEN_FILE" 2>/dev/null) || error "Failed to read token from $TOKEN_FILE" + info "Using cached token from $TOKEN_FILE" +else + echo "๐Ÿ” Paste your Codeberg Personal Access Token (scopes: write:repository, write:ssh_key)" + echo "โ†’ Generate at: $CODEBERG_DOMAIN/settings/tokens" + read -rsp "Token: " TOKEN + echo + [[ -z "$TOKEN" ]] && error "Token cannot be empty" + echo "$TOKEN" > "$TOKEN_FILE" || error "Failed to write token to $TOKEN_FILE" + chmod 600 "$TOKEN_FILE" || error "Failed to set permissions on $TOKEN_FILE" + info "Token saved at $TOKEN_FILE" +fi + +# Set git user info +git config --global user.name "$DEFAULT_NAME" || warn "Failed to set git user name" +git config --global user.email "$DEFAULT_EMAIL" || warn "Failed to set git user email" +info "Git identity set to: $DEFAULT_NAME <$DEFAULT_EMAIL>" + +# Ensure at least one commit exists +if ! git rev-parse HEAD &>/dev/null; then + error "No commits found in the repository. Please add and commit files before running this script." +fi + +# SSH setup with default port (22 for Codeberg) +if [[ ! -f "$HOME/.ssh/id_ed25519" ]]; then + info "Generating SSH key..." + ssh-keygen -t ed25519 -C "$DEFAULT_EMAIL" -f "$HOME/.ssh/id_ed25519" -N "" || error "Failed to generate SSH key" +fi + +eval "$(ssh-agent -s)" >/dev/null 2>&1 || error "Failed to start ssh-agent" +ssh-add "$HOME/.ssh/id_ed25519" >/dev/null 2>&1 || warn "SSH key already added or could not be added" + +# Configure SSH for Codeberg +SSH_CONFIG_FILE="$HOME/.ssh/config" +if ! grep -q "Host $CODEBERG_DOMAIN" "$SSH_CONFIG_FILE" 2>/dev/null; then + mkdir -p "$HOME/.ssh" && chmod 700 "$HOME/.ssh" + cat >> "$SSH_CONFIG_FILE" <&1) +if ! echo "$SSH_TEST_OUTPUT" | grep -q "successfully authenticated"; then + warn "SSH test failed, attempting to upload SSH key. Output: $SSH_TEST_OUTPUT" + PUBKEY=$(cat "$HOME/.ssh/id_ed25519.pub" 2>/dev/null) || error "Failed to read SSH public key" + TITLE="AutoKey-$(hostname)-$(date +%s 2>/dev/null || echo 'unknown')" + CURL_OUTPUT=$(curl -s --fail -X POST "$CODEBERG_API/user/keys" \ + -H "Authorization: token $TOKEN" \ + -H "Content-Type: application/json" \ + -d "{\"title\": \"$TITLE\", \"key\": \"$PUBKEY\", \"read_only\": false}" 2>&1) + if [[ $? -ne 0 ]]; then + warn "SSH key upload failed: $CURL_OUTPUT" + else + info "SSH key uploaded successfully." + sleep 2 + SSH_TEST_OUTPUT=$(ssh -T -p "$CODEBERG_SSH_PORT" "$CODEBERG_SSH" 2>&1) + if ! echo "$SSH_TEST_OUTPUT" | grep -q "successfully authenticated"; then + warn "SSH test still failing after key upload. Output: $SSH_TEST_OUTPUT" + else + info "SSH test passed after key upload." + fi + fi +else + info "SSH test passed: $SSH_TEST_OUTPUT" +fi +set -e + +# Check and create Codeberg repository +info "Checking if repository exists..." +EXISTS=$(curl -s -H "Authorization: token $TOKEN" "$CODEBERG_API/repos/$USERNAME/$REPO_NAME" | jq -r .name 2>/dev/null || echo "") +if [[ "$EXISTS" != "$REPO_NAME" ]]; then + info "Creating repository $REPO_NAME on Codeberg..." + CURL_OUTPUT=$(curl -s --fail -X POST "$CODEBERG_API/user/repos" \ + -H "Authorization: token $TOKEN" \ + -H "Content-Type: application/json" \ + -d "{\"name\": \"$REPO_NAME\", \"description\": \"Created via gitfield-codeberg\", \"private\": false}" 2>&1) || { + warn "Failed to create repository: $CURL_OUTPUT" + error "Repository creation failed. Check token permissions or network." + } + info "Repository created successfully." +fi + +# Set up git remote +REMOTE_URL="$CODEBERG_SSH:$USERNAME/$REPO_NAME.git" +if ! git remote get-url "$GIT_REMOTE_NAME" &>/dev/null; then + info "Adding remote $GIT_REMOTE_NAME..." + git remote add "$GIT_REMOTE_NAME" "$REMOTE_URL" || error "Failed to add remote $GIT_REMOTE_NAME" +else + info "Updating remote $GIT_REMOTE_NAME..." + git remote set-url "$GIT_REMOTE_NAME" "$REMOTE_URL" || error "Failed to set remote URL for $GIT_REMOTE_NAME" +fi + +# Generate metadata file +mkdir -p "$(dirname "$MARKDOWN_FILE")" || error "Failed to create directory for $MARKDOWN_FILE" + +TIMESTAMP=$(date '+%Y-%m-%d %H:%M:%S') || error "Failed to get timestamp" +DEFAULT_BRANCH=$(git symbolic-ref --short HEAD) || error "Failed to get default branch" +REPO_PATH="$REPO_ROOT" +LATEST_SHA=$(git rev-parse HEAD) || error "Failed to get latest commit SHA" +LAST_COMMIT_MSG=$(git log -1 --pretty=format:"%s" 2>/dev/null || echo "Unknown") +LAST_COMMIT_DATE=$(git log -1 --pretty=format:"%ad" 2>/dev/null || echo "Unknown") +LAST_COMMIT_AUTHOR=$(git log -1 --pretty=format:"%an <%ae>" 2>/dev/null || echo "Unknown") +TOTAL_COMMITS=$(git rev-list --count HEAD 2>/dev/null || echo "Unknown") +TRACKED_FILES=$(git ls-files 2>/dev/null | wc -l 2>/dev/null || echo "Unknown") +UNCOMMITTED=$(if ! git diff --quiet 2>/dev/null || ! git diff --cached --quiet 2>/dev/null; then echo "Yes"; else echo "No"; fi) +LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "None") +HOSTNAME=$(hostname 2>/dev/null || echo "Unknown") +CURRENT_USER=$(whoami 2>/dev/null || echo "Unknown") +TIMEZONE=$(date +%Z 2>/dev/null || echo "Unknown") +OS_NAME=$(uname -s 2>/dev/null || echo "Unknown") +KERNEL_VERSION=$(uname -r 2>/dev/null || echo "Unknown") +ARCHITECTURE=$(uname -m 2>/dev/null || echo "Unknown") +OS_PRETTY_NAME=$(grep PRETTY_NAME /etc/os-release 2>/dev/null | cut -d= -f2 | tr -d '"' || echo "Unknown") +DOCKER_CHECK=$(grep -qE '/docker|/lxc' /proc/1/cgroup 2>/dev/null && echo "Yes" || echo "No") +WSL_CHECK=$(grep -qi microsoft /proc/version 2>/dev/null && echo "Yes" || echo "No") +VM_CHECK=$(systemd-detect-virt 2>/dev/null || echo "Unknown") +UPTIME=$(uptime -p 2>/dev/null || echo "Unknown") +MAC_ADDR=$(ip link 2>/dev/null | awk '/ether/ {print $2}' | head -n 1 2>/dev/null || echo "Unknown") +LOCAL_IP=$(hostname -I 2>/dev/null | awk '{print $1}' 2>/dev/null || echo "Unknown") +CPU_MODEL=$(grep -m1 'model name' /proc/cpuinfo 2>/dev/null | cut -d: -f2 | sed 's/^ //' 2>/dev/null || echo "Unknown") +RAM_GB=$(awk '/MemTotal/ {printf "%.2f", $2/1024/1024}' /proc/meminfo 2>/dev/null || echo "Unknown") +WEB_LINK="https://$CODEBERG_DOMAIN/$USERNAME/$REPO_NAME" + +cat > "$MARKDOWN_FILE" </dev/null; then + git push -u "$GIT_REMOTE_NAME" "$DEFAULT_BRANCH" || { + warn "Push to Codeberg failed. Check SSH setup or network." + warn "Run 'ssh -T -p $CODEBERG_SSH_PORT git@$CODEBERG_DOMAIN' to debug." + } +else + git push "$GIT_REMOTE_NAME" "$DEFAULT_BRANCH" || { + warn "Push to Codeberg failed. Check SSH setup or network." + warn "Run 'ssh -T -p $CODEBERG_SSH_PORT git@$CODEBERG_DOMAIN' to debug." + } +fi +set -e + +info "โœ… Codeberg push complete." +echo -e "\n๐Ÿ”— View in browser: $WEB_LINK\n" From 9565283cd0ef7f7981a2d3701989c9f752a4cf06 Mon Sep 17 00:00:00 2001 From: Mark Randall Havens Date: Mon, 9 Jun 2025 07:38:41 -0500 Subject: [PATCH 04/12] Post-Radicle sync at 2025-06-09 07:38:32 --- .gitfield/pushed.log | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitfield/pushed.log b/.gitfield/pushed.log index ac0dad2..82ff228 100644 --- a/.gitfield/pushed.log +++ b/.gitfield/pushed.log @@ -161,3 +161,6 @@ CLI: rad inspect rad:z3FEj7rF8gZw9eFksCuiN43qjzrex # View project details CLI: git ls-tree -r --name-only HEAD # View file structure [2025-06-09 07:38:33] Local: +[2025-06-09 07:38:41] Radicle: RID=rad:z3FEj7rF8gZw9eFksCuiN43qjzrex, Peer ID=z6Mkw5s3ppo26C7y7tGK5MD8n2GqTHS582PPpeX5Xqbu2Mpz + CLI: rad inspect rad:z3FEj7rF8gZw9eFksCuiN43qjzrex # View project details + CLI: git ls-tree -r --name-only HEAD # View file structure From 57c188e282eb1654936b5f9c9167ca060f01149f Mon Sep 17 00:00:00 2001 From: Mark Randall Havens Date: Mon, 9 Jun 2025 08:49:14 -0500 Subject: [PATCH 05/12] =?UTF-8?q?Gitea=20metadata=20link=20commit=20at=202?= =?UTF-8?q?025-06-09=2008:49:13=20=E2=80=94=20https://gitea.com/mrhavens/g?= =?UTF-8?q?it-sigil/commit/9565283cd0ef7f7981a2d3701989c9f752a4cf06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitfield/gitea.sigil.md | 59 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .gitfield/gitea.sigil.md diff --git a/.gitfield/gitea.sigil.md b/.gitfield/gitea.sigil.md new file mode 100644 index 0000000..8531f64 --- /dev/null +++ b/.gitfield/gitea.sigil.md @@ -0,0 +1,59 @@ +# ๐Ÿ”— Gitea Repository Link + +- **Repo Name**: `git-sigil` +- **Gitea User**: `mrhavens` +- **Remote URL**: [https://gitea.com/mrhavens/git-sigil](https://gitea.com/mrhavens/git-sigil) +- **Local Repo Path**: `/home/mrhavens/fieldcraft/git-sigil` +- **Remote Label**: `gitea` +- **Default Branch**: `master` +- **Repo Created**: `2025-06-09 08:49:13` + +--- + +## ๐Ÿ“ฆ Commit Info + +- **This Commit Timestamp**: `2025-06-09 08:49:13` +- **Last Commit SHA**: `9565283cd0ef7f7981a2d3701989c9f752a4cf06` +- **Last Commit Message**: `Post-Radicle sync at 2025-06-09 07:38:32` +- **Last Commit Author**: `Mark Randall Havens ` +- **Last Commit Date**: `Mon Jun 9 07:38:41 2025 -0500` +- **This Commit URL**: [https://gitea.com/mrhavens/git-sigil/commit/9565283cd0ef7f7981a2d3701989c9f752a4cf06](https://gitea.com/mrhavens/git-sigil/commit/9565283cd0ef7f7981a2d3701989c9f752a4cf06) + +--- + +## ๐Ÿ“Š Repo Status + +- **Total Commits**: `898` +- **Tracked Files**: `117` +- **Uncommitted Changes**: `No` +- **Latest Tag**: `None` + +--- + +## ๐Ÿงญ Environment + +- **Host Machine**: `DESKTOP-E5SGI58` +- **Current User**: `mrhavens` +- **Time Zone**: `CDT` +- **Script Version**: `1.0` + +--- + +## ๐Ÿงฌ Hardware & OS Fingerprint + +- **OS Name**: `Linux` +- **OS Version**: `Ubuntu 24.04.2 LTS` +- **Kernel Version**: `5.15.167.4-microsoft-standard-WSL2` +- **Architecture**: `x86_64` +- **Running in Docker**: `No` +- **Running in WSL**: `Yes` +- **Virtual Machine**: `wsl` +- **System Uptime**: `up 11 hours, 9 minutes` +- **MAC Address**: `00:15:5d:3d:32:5b` +- **Local IP**: `172.18.207.124` +- **CPU Model**: `AMD A6-3420M APU with Radeon(tm) HD Graphics` +- **Total RAM (GB)**: `3.63` + +--- + +_Auto-generated by `gitfield-gitea` push script._ From 69fb9c191c78e911a78ad78ef7c5768aa2572e09 Mon Sep 17 00:00:00 2001 From: Mark Randall Havens Date: Mon, 9 Jun 2025 09:01:12 -0500 Subject: [PATCH 06/12] =?UTF-8?q?Local=20metadata=20link=20commit=20at=202?= =?UTF-8?q?025-06-09=2009:01:11=20=E2=80=94=20file:///home/mrhavens/git-lo?= =?UTF-8?q?cal-repos/git-sigil.git?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitfield/local.sigil.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitfield/local.sigil.md b/.gitfield/local.sigil.md index d405654..dfe7278 100644 --- a/.gitfield/local.sigil.md +++ b/.gitfield/local.sigil.md @@ -6,26 +6,26 @@ - **Local Repo Path**: `/home/mrhavens/fieldcraft/git-sigil` - **Remote Label**: `local` - **Default Branch**: `master` -- **Repo Created**: `2025-06-09 07:38:32` +- **Repo Created**: `2025-06-09 09:01:11` --- ## ๐Ÿ“ฆ Commit Info -- **This Commit Timestamp**: `2025-06-09 07:38:32` -- **Last Commit SHA**: `0832f90b05be3e7c58a76d9f63a05c179817a617` -- **Last Commit Message**: `Codeberg metadata link commit at 2025-06-09 07:35:30 โ€” https://codeberg.org/mrhavens/git-sigil/commit/2f0763496109f75cab814d5e81aafc70cfc1f38e` +- **This Commit Timestamp**: `2025-06-09 09:01:11` +- **Last Commit SHA**: `57c188e282eb1654936b5f9c9167ca060f01149f` +- **Last Commit Message**: `Gitea metadata link commit at 2025-06-09 08:49:13 โ€” https://gitea.com/mrhavens/git-sigil/commit/9565283cd0ef7f7981a2d3701989c9f752a4cf06` - **Last Commit Author**: `Mark Randall Havens ` -- **Last Commit Date**: `Mon Jun 9 07:35:30 2025 -0500` +- **Last Commit Date**: `Mon Jun 9 08:49:14 2025 -0500` - **This Commit URL**: `file:///home/mrhavens/git-local-repos/git-sigil.git` --- ## ๐Ÿ“Š Repo Status -- **Total Commits**: `895` -- **Tracked Files**: `116` -- **Uncommitted Changes**: `No` +- **Total Commits**: `899` +- **Tracked Files**: `118` +- **Uncommitted Changes**: `Yes` - **Latest Tag**: `None` --- @@ -48,7 +48,7 @@ - **Running in Docker**: `No` - **Running in WSL**: `Yes` - **Virtual Machine**: `wsl` -- **System Uptime**: `up 9 hours, 58 minutes` +- **System Uptime**: `up 11 hours, 21 minutes` - **MAC Address**: `00:15:5d:3d:32:5b` - **Local IP**: `172.18.207.124` - **CPU Model**: `AMD A6-3420M APU with Radeon(tm) HD Graphics` From 56df4761d52228e89063943328e28eb65e658ee9 Mon Sep 17 00:00:00 2001 From: Mark Randall Havens Date: Mon, 9 Jun 2025 09:01:12 -0500 Subject: [PATCH 07/12] Post-Local sync at 2025-06-09 09:01:11 --- .gitfield/push_log.json | 6 + .gitfield/pushed.log | 1 + bin/gitfield-gitea | 261 +++++++++++++++++++++++++++++++++++++++ bin/gitfield-sourceforge | 224 +++++++++++++++++++++++++++++++++ bin/gitfield-sync | 32 +++-- bin/gitfield-sync-OLD | 245 ++++++++++++++++++++++++++++++++++++ 6 files changed, 760 insertions(+), 9 deletions(-) create mode 100755 bin/gitfield-gitea create mode 100644 bin/gitfield-sourceforge create mode 100755 bin/gitfield-sync-OLD diff --git a/.gitfield/push_log.json b/.gitfield/push_log.json index 26f092c..33f462e 100644 --- a/.gitfield/push_log.json +++ b/.gitfield/push_log.json @@ -182,6 +182,12 @@ "branch": "master", "commit": "0832f90b05be3e7c58a76d9f63a05c179817a617", "message": "Codeberg metadata link commit at 2025-06-09 07:35:30 โ€” https://codeberg.org/mrhavens/git-sigil/commit/2f0763496109f75cab814d5e81aafc70cfc1f38e" + }, + { + "timestamp": "2025-06-09 09:01:11", + "branch": "master", + "commit": "57c188e282eb1654936b5f9c9167ca060f01149f", + "message": "Gitea metadata link commit at 2025-06-09 08:49:13 โ€” https://gitea.com/mrhavens/git-sigil/commit/9565283cd0ef7f7981a2d3701989c9f752a4cf06" } ] } diff --git a/.gitfield/pushed.log b/.gitfield/pushed.log index 82ff228..3d2b008 100644 --- a/.gitfield/pushed.log +++ b/.gitfield/pushed.log @@ -164,3 +164,4 @@ [2025-06-09 07:38:41] Radicle: RID=rad:z3FEj7rF8gZw9eFksCuiN43qjzrex, Peer ID=z6Mkw5s3ppo26C7y7tGK5MD8n2GqTHS582PPpeX5Xqbu2Mpz CLI: rad inspect rad:z3FEj7rF8gZw9eFksCuiN43qjzrex # View project details CLI: git ls-tree -r --name-only HEAD # View file structure +[2025-06-09 09:01:12] Local: diff --git a/bin/gitfield-gitea b/bin/gitfield-gitea new file mode 100755 index 0000000..4ce6550 --- /dev/null +++ b/bin/gitfield-gitea @@ -0,0 +1,261 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + +# Configuration +GIT_REMOTE_NAME="gitea" +GITEA_DOMAIN="gitea.com" +GITEA_SSH="git@$GITEA_DOMAIN" +GITEA_SSH_PORT="22" +GITEA_API="https://$GITEA_DOMAIN/api/v1" +USERNAME="mrhavens" +REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null) || { echo "[ERROR] Not inside a git repository. Please run this script from within a git repository." >&2; exit 1; } +REPO_NAME=$(basename "$REPO_ROOT") || { echo "[ERROR] Failed to get repository name" >&2; exit 1; } +MARKDOWN_FILE="$REPO_ROOT/.gitfield/gitea.sigil.md" +DEFAULT_NAME="Mark Randall Havens" +DEFAULT_EMAIL="mark.r.havens@gmail.com" +TOKEN_FILE="$HOME/.gitea_token" +SCRIPT_VERSION="1.0" + +# Logging functions +info() { echo -e "\e[1;34m[INFO]\e[0m $*"; } +warn() { echo -e "\e[1;33m[WARN]\e[0m $*"; } +error() { echo -e "\e[1;31m[ERROR]\e[0m $*" >&2; exit 1; } + +# Check for required tools +info "Checking for required tools..." +for cmd in git curl jq ssh lsb_release; do + command -v "$cmd" >/dev/null || { + sudo apt update -qq || warn "Failed to update package lists, continuing..." + sudo apt install -y git curl jq openssh-client lsb-release || error "Failed to install $cmd" + } +done + +# Handle Gitea token +RESET_TOKEN=false +if [[ "${1:-}" == "--reset-token" ]]; then + RESET_TOKEN=true + rm -f "$TOKEN_FILE" 2>/dev/null || warn "Failed to remove token file" + info "Token reset requested." +fi + +if [[ -f "$TOKEN_FILE" && "$RESET_TOKEN" == false ]]; then + TOKEN=$(cat "$TOKEN_FILE" 2>/dev/null) || error "Failed to read token from $TOKEN_FILE" + info "Using cached token from $TOKEN_FILE" +else + echo "๐Ÿ” Paste your Gitea Personal Access Token (scopes: write:repository, write:ssh_key)" + echo "โ†’ Generate at: $GITEA_DOMAIN/user/settings/applications" + read -rsp "Token: " TOKEN + echo + [[ -z "$TOKEN" ]] && error "Token cannot be empty" + echo "$TOKEN" > "$TOKEN_FILE" || error "Failed to write token to $TOKEN_FILE" + chmod 600 "$TOKEN_FILE" || error "Failed to set permissions on $TOKEN_FILE" + info "Token saved at $TOKEN_FILE" +fi + +# Set git user info +git config --global user.name "$DEFAULT_NAME" || warn "Failed to set git user name" +git config --global user.email "$DEFAULT_EMAIL" || warn "Failed to set git user email" +info "Git identity set to: $DEFAULT_NAME <$DEFAULT_EMAIL>" + +# Ensure at least one commit exists +if ! git rev-parse HEAD &>/dev/null; then + error "No commits found in the repository. Please add and commit files before running this script." +fi + +# SSH setup with default port (22 for Gitea.com) +if [[ ! -f "$HOME/.ssh/id_ed25519" ]]; then + info "Generating SSH key..." + ssh-keygen -t ed25519 -C "$DEFAULT_EMAIL" -f "$HOME/.ssh/id_ed25519" -N "" || error "Failed to generate SSH key" +fi + +eval "$(ssh-agent -s)" >/dev/null 2>&1 || error "Failed to start ssh-agent" +ssh-add "$HOME/.ssh/id_ed25519" >/dev/null 2>&1 || warn "SSH key already added or could not be added" + +# Configure SSH for Gitea.com +SSH_CONFIG_FILE="$HOME/.ssh/config" +if ! grep -q "Host $GITEA_DOMAIN" "$SSH_CONFIG_FILE" 2>/dev/null; then + mkdir -p "$HOME/.ssh" && chmod 700 "$HOME/.ssh" + cat >> "$SSH_CONFIG_FILE" <&1) +if ! echo "$SSH_TEST_OUTPUT" | grep -q "successfully authenticated"; then + warn "SSH test failed, attempting to upload SSH key. Output: $SSH_TEST_OUTPUT" + PUBKEY=$(cat "$HOME/.ssh/id_ed25519.pub" 2>/dev/null) || error "Failed to read SSH public key" + TITLE="AutoKey-$(hostname)-$(date +%s 2>/dev/null || echo 'unknown')" + CURL_OUTPUT=$(curl -s --fail -X POST "$GITEA_API/user/keys" \ + -H "Authorization: token $TOKEN" \ + -H "Content-Type: application/json" \ + -d "{\"title\": \"$TITLE\", \"key\": \"$PUBKEY\", \"read_only\": false}" 2>&1) + if [[ $? -ne 0 ]]; then + warn "SSH key upload failed: $CURL_OUTPUT" + else + info "SSH key uploaded successfully." + sleep 2 + SSH_TEST_OUTPUT=$(ssh -T -p "$GITEA_SSH_PORT" "$GITEA_SSH" 2>&1) + if ! echo "$SSH_TEST_OUTPUT" | grep -q "successfully authenticated"; then + warn "SSH test still failing after key upload. Output: $SSH_TEST_OUTPUT" + else + info "SSH test passed after key upload." + fi + fi +else + info "SSH test passed: $SSH_TEST_OUTPUT" +fi +set -e + +# Check and create Gitea repository +info "Checking if repository exists..." +EXISTS=$(curl -s -H "Authorization: token $TOKEN" "$GITEA_API/repos/$USERNAME/$REPO_NAME" | jq -r .name 2>/dev/null || echo "") +if [[ "$EXISTS" != "$REPO_NAME" ]]; then + info "Creating repository $REPO_NAME on Gitea..." + CURL_OUTPUT=$(curl -s --fail -X POST "$GITEA_API/user/repos" \ + -H "Authorization: token $TOKEN" \ + -H "Content-Type: application/json" \ + -d "{\"name\": \"$REPO_NAME\", \"description\": \"Created via gitfield-gitea\", \"private\": false}" 2>&1) || { + warn "Failed to create repository: $CURL_OUTPUT" + error "Repository creation failed. Check token permissions or network." + } + info "Repository created successfully." +fi + +# Set up git remote +REMOTE_URL="$GITEA_SSH:$USERNAME/$REPO_NAME.git" +if ! git remote get-url "$GIT_REMOTE_NAME" &>/dev/null; then + info "Adding remote $GIT_REMOTE_NAME..." + git remote add "$GIT_REMOTE_NAME" "$REMOTE_URL" || error "Failed to add remote $GIT_REMOTE_NAME" +else + info "Updating remote $GIT_REMOTE_NAME..." + git remote set-url "$GIT_REMOTE_NAME" "$REMOTE_URL" || error "Failed to set remote URL for $GIT_REMOTE_NAME" +fi + +# Generate metadata file +mkdir -p "$(dirname "$MARKDOWN_FILE")" || error "Failed to create directory for $MARKDOWN_FILE" + +TIMESTAMP=$(date '+%Y-%m-%d %H:%M:%S') || error "Failed to get timestamp" +DEFAULT_BRANCH=$(git symbolic-ref --short HEAD) || error "Failed to get default branch" +REPO_PATH="$REPO_ROOT" +LATEST_SHA=$(git rev-parse HEAD) || error "Failed to get latest commit SHA" +LAST_COMMIT_MSG=$(git log -1 --pretty=format:"%s" 2>/dev/null || echo "Unknown") +LAST_COMMIT_DATE=$(git log -1 --pretty=format:"%ad" 2>/dev/null || echo "Unknown") +LAST_COMMIT_AUTHOR=$(git log -1 --pretty=format:"%an <%ae>" 2>/dev/null || echo "Unknown") +TOTAL_COMMITS=$(git rev-list --count HEAD 2>/dev/null || echo "Unknown") +TRACKED_FILES=$(git ls-files 2>/dev/null | wc -l 2>/dev/null || echo "Unknown") +UNCOMMITTED=$(if ! git diff --quiet 2>/dev/null || ! git diff --cached --quiet 2>/dev/null; then echo "Yes"; else echo "No"; fi) +LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "None") +HOSTNAME=$(hostname 2>/dev/null || echo "Unknown") +CURRENT_USER=$(whoami 2>/dev/null || echo "Unknown") +TIMEZONE=$(date +%Z 2>/dev/null || echo "Unknown") +OS_NAME=$(uname -s 2>/dev/null || echo "Unknown") +KERNEL_VERSION=$(uname -r 2>/dev/null || echo "Unknown") +ARCHITECTURE=$(uname -m 2>/dev/null || echo "Unknown") +OS_PRETTY_NAME=$(grep PRETTY_NAME /etc/os-release 2>/dev/null | cut -d= -f2 | tr -d '"' || echo "Unknown") +DOCKER_CHECK=$(grep -qE '/docker|/lxc' /proc/1/cgroup 2>/dev/null && echo "Yes" || echo "No") +WSL_CHECK=$(grep -qi microsoft /proc/version 2>/dev/null && echo "Yes" || echo "No") +VM_CHECK=$(systemd-detect-virt 2>/dev/null || echo "Unknown") +UPTIME=$(uptime -p 2>/dev/null || echo "Unknown") +MAC_ADDR=$(ip link 2>/dev/null | awk '/ether/ {print $2}' | head -n 1 2>/dev/null || echo "Unknown") +LOCAL_IP=$(hostname -I 2>/dev/null | awk '{print $1}' 2>/dev/null || echo "Unknown") +CPU_MODEL=$(grep -m1 'model name' /proc/cpuinfo 2>/dev/null | cut -d: -f2 | sed 's/^ //' 2>/dev/null || echo "Unknown") +RAM_GB=$(awk '/MemTotal/ {printf "%.2f", $2/1024/1024}' /proc/meminfo 2>/dev/null || echo "Unknown") +WEB_LINK="https://$GITEA_DOMAIN/$USERNAME/$REPO_NAME" + +cat > "$MARKDOWN_FILE" </dev/null; then + git push -u "$GIT_REMOTE_NAME" "$DEFAULT_BRANCH" || { + warn "Push to Gitea failed. Check SSH setup or network." + warn "Run 'ssh -T -p $GITEA_SSH_PORT git@$GITEA_DOMAIN' to debug." + } +else + git push "$GIT_REMOTE_NAME" "$DEFAULT_BRANCH" || { + warn "Push to Gitea failed. Check SSH setup or network." + warn "Run 'ssh -T -p $GITEA_SSH_PORT git@$GITEA_DOMAIN' to debug." + } +fi +set -e + +info "โœ… Gitea push complete." +echo -e "\n๐Ÿ”— View in browser: $WEB_LINK\n" diff --git a/bin/gitfield-sourceforge b/bin/gitfield-sourceforge new file mode 100644 index 0000000..6018df1 --- /dev/null +++ b/bin/gitfield-sourceforge @@ -0,0 +1,224 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + +# Configuration +GIT_REMOTE_NAME="sourceforge" +SOURCEFORGE_DOMAIN="git.code.sf.net" +SOURCEFORGE_SSH="ssh://USERNAME@$SOURCEFORGE_DOMAIN" +PROJECT_NAME="mrhavens" # SourceForge UNIX group name (project name) +USERNAME="mrhavens" # SourceForge username +REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null) || { echo "[ERROR] Not inside a git repository. Please run this script from within a git repository." >&2; exit 1; } +REPO_NAME=$(basename "$REPO_ROOT") || { echo "[ERROR] Failed to get repository name" >&2; exit 1; } +MARKDOWN_FILE="$REPO_ROOT/.gitfield/sourceforge.sigil.md" +DEFAULT_NAME="Mark Randall Havens" +DEFAULT_EMAIL="mark.r.havens@gmail.com" +SSH_KEY_FILE="$HOME/.ssh/id_ed25519" +SSH_CONFIG_FILE="$HOME/.ssh/config" +SCRIPT_VERSION="1.0" + +# Logging functions +info() { echo -e "\e[1;34m[INFO]\e[0m $*"; } +warn() { echo -e "\e[1;33m[WARN]\e[0m $*"; } +error() { echo -e "\e[1;31m[ERROR]\e[0m $*" >&2; exit 1; } + +# Check for required tools +info "Checking for required tools..." +for cmd in git curl jq ssh lsb_release; do + command -v "$cmd" >/dev/null || { + sudo apt update -qq || warn "Failed to update package lists, continuing..." + sudo apt install -y git curl jq openssh-client lsb-release || error "Failed to install $cmd" + } +done + +# Set git user info +git config --global user.name "$DEFAULT_NAME" || warn "Failed to set git user name" +git config --global user.email "$DEFAULT_EMAIL" || warn "Failed to set git user email" +info "Git identity set to: $DEFAULT_NAME <$DEFAULT_EMAIL>" + +# Ensure at least one commit exists +if ! git rev-parse HEAD &>/dev/null; then + error "No commits found in the repository. Please add and commit files before running this script." +fi + +# SSH setup +if [[ ! -f "$SSH_KEY_FILE" ]]; then + info "Generating SSH key..." + ssh-keygen -t ed25519 -C "$DEFAULT_EMAIL" -f "$SSH_KEY_FILE" -N "" || error "Failed to generate SSH key" +fi + +eval "$(ssh-agent -s)" >/dev/null 2>&1 || error "Failed to start ssh-agent" +ssh-add "$SSH_KEY_FILE" >/dev/null 2>&1 || warn "SSH key already added or could not be added" + +# Configure SSH for SourceForge +if ! grep -q "Host $SOURCEFORGE_DOMAIN" "$SSH_CONFIG_FILE" 2>/dev/null; then + mkdir -p "$HOME/.ssh" && chmod 700 "$HOME/.ssh" + cat >> "$SSH_CONFIG_FILE" <&1) +if ! echo "$SSH_TEST_OUTPUT" | grep -q "successfully authenticated"; then + warn "SSH test failed. Please upload your SSH public key to SourceForge." + echo "โ†’ Visit: https://sourceforge.net/account/ssh" + echo "Your public key:" + cat "$SSH_KEY_FILE.pub" + error "SSH key not authorized. Upload the key and try again." +else + info "SSH test passed: $SSH_TEST_OUTPUT" +fi +set -e + +# SourceForge repository setup +# Note: SourceForge requires manual repository creation via the web interface. +# Check if the repository exists by attempting to fetch its GitWeb page. +info "Checking if repository exists..." +REPO_URL="https://sourceforge.net/p/$PROJECT_NAME/$REPO_NAME" +CURL_OUTPUT=$(curl -s -o /dev/null -w "%{http_code}" "$REPO_URL") +if [[ "$CURL_OUTPUT" != "200" ]]; then + warn "Repository $REPO_NAME does not exist on SourceForge." + echo "โ†’ Please create the repository manually at: https://sourceforge.net/projects/$PROJECT_NAME/admin" + echo "โ†’ Instructions: Go to 'Admin' -> 'Tools' -> 'Git' -> Select label and mountpoint (e.g., '$REPO_NAME')" + error "Repository not found. Create it manually and try again." +fi +info "Repository $REPO_NAME exists at $REPO_URL" + +# Set up git remote +REMOTE_URL="ssh://$USERNAME@$SOURCEFORGE_DOMAIN/p/$PROJECT_NAME/$REPO_NAME" +if ! git remote get-url "$GIT_REMOTE_NAME" &>/dev/null; then + info "Adding remote $GIT_REMOTE_NAME..." + git remote add "$GIT_REMOTE_NAME" "$REMOTE_URL" || error "Failed to add remote $GIT_REMOTE_NAME" +else + info "Updating remote $GIT_REMOTE_NAME..." + git remote set-url "$GIT_REMOTE_NAME" "$REMOTE_URL" || error "Failed to set remote URL for $GIT_REMOTE_NAME" +fi + +# Generate metadata file +mkdir -p "$(dirname "$MARKDOWN_FILE")" || error "Failed to create directory for $MARKDOWN_FILE" + +TIMESTAMP=$(date '+%Y-%m-%d %H:%M:%S') || error "Failed to get timestamp" +DEFAULT_BRANCH=$(git symbolic-ref --short HEAD) || error "Failed to get default branch" +REPO_PATH="$REPO_ROOT" +LATEST_SHA=$(git rev-parse HEAD) || error "Failed to get latest commit SHA" +LAST_COMMIT_MSG=$(git log -1 --pretty=format:"%s" 2>/dev/null || echo "Unknown") +LAST_COMMIT_DATE=$(git log -1 --pretty=format:"%ad" 2>/dev/null || echo "Unknown") +LAST_COMMIT_AUTHOR=$(git log -1 --pretty=format:"%an <%ae>" 2>/dev/null || echo "Unknown") +TOTAL_COMMITS=$(git rev-list --count HEAD 2>/dev/null || echo "Unknown") +TRACKED_FILES=$(git ls-files 2>/dev/null | wc -l 2>/dev/null || echo "Unknown") +UNCOMMITTED=$(if ! git diff --quiet 2>/dev/null || ! git diff --cached --quiet 2>/dev/null; then echo "Yes"; else echo "No"; fi) +LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "None") +HOSTNAME=$(hostname 2>/dev/null || echo "Unknown") +CURRENT_USER=$(whoami 2>/dev/null || echo "Unknown") +TIMEZONE=$(date +%Z 2>/dev/null || echo "Unknown") +OS_NAME=$(uname -s 2>/dev/null || echo "Unknown") +KERNEL_VERSION=$(uname -r 2>/dev/null || echo "Unknown") +ARCHITECTURE=$(uname -m 2>/dev/null || echo "Unknown") +OS_PRETTY_NAME=$(grep PRETTY_NAME /etc/os-release 2>/dev/null | cut -d= -f2 | tr -d '"' || echo "Unknown") +DOCKER_CHECK=$(grep -qE '/docker|/lxc' /proc/1/cgroup 2>/dev/null && echo "Yes" || echo "No") +WSL_CHECK=$(grep -qi microsoft /proc/version 2>/dev/null && echo "Yes" || echo "No") +VM_CHECK=$(systemd-detect-virt 2>/dev/null || echo "Unknown") +UPTIME=$(uptime -p 2>/dev/null || echo "Unknown") +MAC_ADDR=$(ip link 2>/dev/null | awk '/ether/ {print $2}' | head -n 1 2>/dev/null || echo "Unknown") +LOCAL_IP=$(hostname -I 2>/dev/null | awk '{print $1}' 2>/dev/null || echo "Unknown") +CPU_MODEL=$(grep -m1 'model name' /proc/cpuinfo 2>/dev/null | cut -d: -f2 | sed 's/^ //' 2>/dev/null || echo "Unknown") +RAM_GB=$(awk '/MemTotal/ {printf "%.2f", $2/1024/1024}' /proc/meminfo 2>/dev/null || echo "Unknown") +WEB_LINK="https://sourceforge.net/p/$PROJECT_NAME/$REPO_NAME" + +cat > "$MARKDOWN_FILE" </dev/null; then + git push -u "$GIT_REMOTE_NAME" "$DEFAULT_BRANCH" || { + warn "Push to SourceForge failed. Check SSH setup or network." + warn "Run 'ssh -T $USERNAME@$SOURCEFORGE_DOMAIN' to debug." + } +else + git push "$GIT_REMOTE_NAME" "$DEFAULT_BRANCH" || { + warn "Push to SourceForge failed. Check SSH setup or network." + warn "Run 'ssh -T $USERNAME@$SOURCEFORGE_DOMAIN' to debug." + } +fi +set -e + +info "โœ… SourceForge push complete." +echo -e "\n๐Ÿ”— View in browser: $WEB_LINK\n" diff --git a/bin/gitfield-sync b/bin/gitfield-sync index 4b07642..d3e0499 100755 --- a/bin/gitfield-sync +++ b/bin/gitfield-sync @@ -18,6 +18,8 @@ GITHUB_URL="https://github.com/mrhavens/$REPO_NAME" GITLAB_URL="https://gitlab.com/mrhavens/$REPO_NAME" BITBUCKET_URL="https://bitbucket.org/thefoldwithin/$REPO_NAME" FORGEJO_URL="https://remember.thefoldwithin.earth/mrhavens/$REPO_NAME" +CODEBERG_URL="https://codeberg.org/mrhavens/$REPO_NAME" +GITEA_URL="https://gitea.com/mrhavens/$REPO_NAME" RADICLE_RID="rad:z3FEj7rF8gZw9eFksCuiN43qjzrex" RADICLE_PEER_ID="z6Mkw5s3ppo26C7y7tGK5MD8n2GqTHS582PPpeX5Xqbu2Mpz" @@ -81,7 +83,7 @@ generate_gitfield_md() { ## Overview -The \`$REPO_NAME\` project employs a multi-repository strategy across five distinct platforms: **GitHub**, **GitLab**, **Bitbucket**, **Radicle**, and **Forgejo**. This approach ensures **redundancy**, **resilience**, and **sovereignty** of the project's data and metadata, protecting against deplatforming risks and preserving the integrity of the work. The strategy is a deliberate response to past deplatforming and delisting attempts by individuals such as **Mr. Joel Johnson** ([Mirror post](https://mirror.xyz/neutralizingnarcissism.eth/x40_zDWWrYOJ7nh8Y0fk06_3kNEP0KteSSRjPmXkiGg?utm_medium=social&utm_source=heylink.me)), **Dr. Peter Gaied** ([Paragraph post](https://paragraph.com/@neutralizingnarcissism/%F0%9F%9C%81-the-narcissistic-messiah)), and **Andrew LeCody** ([Mirror post](https://mirror.xyz/neutralizingnarcissism.eth/s3GRxuiZs6vGSGDcPEpCgjaSxwGAViGhmg6a5XTL6s0)), who have sought to undermine or suppress the work of **Mark Randall Havens** ([Substack post](https://theempathictechnologist.substack.com/p/mark-randall-havens-the-architect)). Specifically, Andrew LeCody has attempted to delist the project's content on Google, though it remains accessible on other search engines such as [Bing](https://www.bing.com/search?q=andrew+lecody+neutralizing+narcissism&qs=HS&pq=andrew+lecody), [DuckDuckGo](https://duckduckgo.com/?t=h_&q=andrew+lecody+neutralizing+narcissism&ia=web), and [Yahoo](https://search.yahoo.com/search?p=andrew+lecody+neutralizng+narcissism). By distributing the repository across multiple platforms, including a self-hosted Forgejo instance, we ensure its persistence, accessibility, and sovereignty. +The \`$REPO_NAME\` project employs a multi-repository strategy across seven distinct platforms: **GitHub**, **GitLab**, **Bitbucket**, **Radicle**, **Forgejo**, **Codeberg**, and **Gitea**. This approach ensures **redundancy**, **resilience**, and **sovereignty** of the project's data and metadata, protecting against deplatforming risks and preserving the integrity of the work. The strategy is a deliberate response to past deplatforming and delisting attempts by individuals such as **Mr. Joel Johnson** ([Mirror post](https://mirror.xyz/neutralizingnarcissism.eth/x40_zDWWrYOJ7nh8Y0fk06_3kNEP0KteSSRjPmXkiGg?utm_medium=social&utm_source=heylink.me)), **Dr. Peter Gaied** ([Paragraph post](https://paragraph.com/@neutralizingnarcissism/%F0%9F%9C%81-the-narcissistic-messiah)), and **Andrew LeCody** ([Mirror post](https://mirror.xyz/neutralizingnarcissism.eth/s3GRxuiZs6vGSGDcPEpCgjaSxwGAViGhmg6a5XTL6s0)), who have sought to undermine or suppress the work of **Mark Randall Havens** ([Substack post](https://theempathictechnologist.substack.com/p/mark-randall-havens-the-architect)). Specifically, Andrew LeCody has attempted to delist the project's content on Google, though it remains accessible on other search engines such as [Bing](https://www.bing.com/search?q=andrew+lecody+neutralizing+narcissism&qs=HS&pq=andrew+lecody), [DuckDuckGo](https://duckduckgo.com/?t=h_&q=andrew+lecody+neutralizing+narcissism&ia=web), and [Yahoo](https://search.yahoo.com/search?p=andrew+lecody+neutralizng+narcissism). By distributing the repository across multiple platforms, including a self-hosted Forgejo instance, we ensure its persistence, accessibility, and sovereignty. --- @@ -113,20 +115,30 @@ The following platforms host the \`$REPO_NAME\` repository, each chosen for its - **Value**: Enhances resilience by hosting the repository on a sovereign, redundant system with automated backups and deployment strategies, reducing risks of external interference or service disruptions. - **Access Details**: SSH access uses port 222: \`\`\`bash - ssh -T -p 222 username@remember.thefoldwithin.earth + ssh -T -p 222 git@remember.thefoldwithin.earth \`\`\` -### 3. GitLab +### 3. Codeberg +- **URL**: [$CODEBERG_URL]($CODEBERG_URL) +- **Purpose**: Codeberg is a community-driven, open-source platform powered by Forgejo, offering a reliable and ethical alternative for hosting git repositories. +- **Value**: Enhances project resilience with its open-source ethos and independent infrastructure, ensuring accessibility and community support. + +### 4. Gitea +- **URL**: [$GITEA_URL]($GITEA_URL) +- **Purpose**: Gitea.com provides a lightweight, open-source git hosting platform with robust features for repository management and collaboration. +- **Value**: Offers an additional layer of redundancy and a user-friendly interface, complementing other platforms with its simplicity and efficiency. + +### 5. GitLab - **URL**: [$GITLAB_URL]($GITLAB_URL) - **Purpose**: GitLab offers a comprehensive DevOps platform with advanced CI/CD capabilities, private repository options, and robust access controls. It serves as a reliable backup and a platform for advanced automation workflows. - **Value**: Enhances project resilience with its integrated CI/CD pipelines and independent infrastructure, reducing reliance on a single provider. -### 4. Bitbucket +### 6. Bitbucket - **URL**: [$BITBUCKET_URL]($BITBUCKET_URL) - **Purpose**: Bitbucket provides a secure environment for repository hosting with strong integration into Atlassianโ€™s ecosystem (e.g., Jira, Trello). It serves as an additional layer of redundancy and a professional-grade hosting option. - **Value**: Offers enterprise-grade security and integration capabilities, ensuring the project remains accessible even if other platforms face disruptions. -### 5. GitHub +### 7. GitHub - **URL**: [$GITHUB_URL]($GITHUB_URL) - **Purpose**: GitHub serves as the primary platform for visibility, collaboration, and community engagement. Its widespread adoption and robust tooling make it ideal for public-facing development, issue tracking, and integration with CI/CD pipelines. - **Value**: Provides a centralized hub for open-source contributions, pull requests, and project management, ensuring broad accessibility and developer familiarity. @@ -135,11 +147,11 @@ The following platforms host the \`$REPO_NAME\` repository, each chosen for its ## ๐Ÿ›ก๏ธ Rationale for Redundancy -The decision to maintain multiple repositories stems from the need to safeguard the project against **deplatforming attempts** and **search engine delistings** and ensure its **long-term availability**. Past incidents involving **Mr. Joel Johnson**, **Dr. Peter Gaied**, and **Andrew LeCody** have highlighted the vulnerability of relying on a single platform or search engine. By distributing the repository across GitHub, GitLab, Bitbucket, Radicle, and a self-hosted Forgejo instance, we achieve: +The decision to maintain multiple repositories stems from the need to safeguard the project against **deplatforming attempts** and **search engine delistings** and ensure its **long-term availability**. Past incidents involving **Mr. Joel Johnson**, **Dr. Peter Gaied**, and **Andrew LeCody** have highlighted the vulnerability of relying on a single platform or search engine. By distributing the repository across GitHub, GitLab, Bitbucket, Radicle, Forgejo, Codeberg, and Gitea, we achieve: - **Resilience**: If one platform removes or restricts access, or if search engines like Google delist content, the project remains accessible on other platforms and discoverable via alternative search engines such as Bing, DuckDuckGo, and Yahoo. - **Sovereignty**: Radicleโ€™s decentralized nature and Forgejoโ€™s self-hosted infrastructure ensure the project cannot be fully censored or controlled by any single entity. -- **Diversity**: Each platformโ€™s unique features (e.g., GitHubโ€™s community, GitLabโ€™s CI/CD, Bitbucketโ€™s integrations, Radicleโ€™s decentralization, Forgejoโ€™s self-hosting) enhance the projectโ€™s functionality and reach. +- **Diversity**: Each platformโ€™s unique features (e.g., GitHubโ€™s community, GitLabโ€™s CI/CD, Bitbucketโ€™s integrations, Radicleโ€™s decentralization, Forgejoโ€™s self-hosting, Codebergโ€™s community-driven model, Giteaโ€™s lightweight efficiency) enhance the projectโ€™s functionality and reach. - **Transparency**: Metadata snapshots in the \`.gitfield\` directory provide a verifiable record of the projectโ€™s state across all platforms. This multi-repository approach, bolstered by Forgejoโ€™s sovereign hosting, reflects a commitment to preserving the integrity, accessibility, and independence of \`$REPO_NAME\`, ensuring it remains available to contributors and users regardless of external pressures. @@ -148,10 +160,10 @@ This multi-repository approach, bolstered by Forgejoโ€™s sovereign hosting, refl ## ๐Ÿ“œ Metadata and Logs -- **Metadata Files**: Each platform generates a metadata snapshot in the \`.gitfield\` directory (e.g., \`github.sigil.md\`, \`gitlab.sigil.md\`, \`remember.sigil.md\`, etc.), capturing commit details, environment information, and hardware fingerprints. +- **Metadata Files**: Each platform generates a metadata snapshot in the \`.gitfield\` directory (e.g., \`github.sigil.md\`, \`gitlab.sigil.md\`, \`remember.sigil.md\`, \`codeberg.sigil.md\`, \`gitea.sigil.md\`, etc.), capturing commit details, environment information, and hardware fingerprints. - **Push Log**: The \`.gitfield/pushed.log\` file records the date, time, and RID/URL of every push operation across all platforms, providing a transparent audit trail. - **Recursive Sync**: The repository is synchronized across all platforms in a recursive loop (three cycles) to ensure interconnected metadata captures the latest state of the project. -- **Push Order**: The repository is synchronized in the following order: **Radicle โ†’ Forgejo โ†’ GitLab โ†’ Bitbucket โ†’ GitHub**. This prioritizes Radicleโ€™s decentralized, censorship-resistant network as the primary anchor, followed by Forgejoโ€™s sovereign, self-hosted infrastructure, GitLabโ€™s robust DevOps features, Bitbucketโ€™s enterprise redundancy, and GitHubโ€™s broad visibility, ensuring a resilient and accessible metadata chain. +- **Push Order**: The repository is synchronized in the following order: **Radicle โ†’ Forgejo โ†’ Codeberg โ†’ Gitea โ†’ GitLab โ†’ Bitbucket โ†’ GitHub**. This prioritizes Radicleโ€™s decentralized, censorship-resistant network as the primary anchor, followed by Forgejoโ€™s sovereign, self-hosted infrastructure, Codebergโ€™s community-driven platform, Giteaโ€™s lightweight efficiency, GitLabโ€™s robust DevOps features, Bitbucketโ€™s enterprise redundancy, and GitHubโ€™s broad visibility, ensuring a resilient and accessible metadata chain. --- @@ -217,6 +229,8 @@ run_push_cycle() { execute_push "gitfield-local" "Local" "" "" "" execute_push "gitfield-radicle" "Radicle" "" "$RADICLE_RID" "$RADICLE_PEER_ID" execute_push "gitfield-remember" "Forgejo" "$FORGEJO_URL" "" "" + execute_push "gitfield-codeberg" "Codeberg" "$CODEBERG_URL" "" "" + execute_push "gitfield-gitea" "Gitea" "$GITEA_URL" "" "" execute_push "gitfield-gitlab" "GitLab" "$GITLAB_URL" "" "" execute_push "gitfield-bitbucket" "Bitbucket" "$BITBUCKET_URL" "" "" execute_push "gitfield-github" "GitHub" "$GITHUB_URL" "" "" diff --git a/bin/gitfield-sync-OLD b/bin/gitfield-sync-OLD new file mode 100755 index 0000000..4b07642 --- /dev/null +++ b/bin/gitfield-sync-OLD @@ -0,0 +1,245 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + +# โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +# โ”‚ CONFIGURATION โ”‚ +# โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +REPO_PATH=$(git rev-parse --show-toplevel 2>/dev/null) || error "Not inside a Git repository" +REPO_NAME=$(basename "$REPO_PATH") +GITFIELD_DIR="$REPO_PATH/.gitfield" +LOG_FILE="$GITFIELD_DIR/pushed.log" +GITFIELD_MD="$REPO_PATH/GITFIELD.md" +TIMESTAMP=$(date '+%Y-%m-%d %H:%M:%S') +SCRIPT_VERSION="1.0" + +# URLs for each platform +GITHUB_URL="https://github.com/mrhavens/$REPO_NAME" +GITLAB_URL="https://gitlab.com/mrhavens/$REPO_NAME" +BITBUCKET_URL="https://bitbucket.org/thefoldwithin/$REPO_NAME" +FORGEJO_URL="https://remember.thefoldwithin.earth/mrhavens/$REPO_NAME" +RADICLE_RID="rad:z3FEj7rF8gZw9eFksCuiN43qjzrex" +RADICLE_PEER_ID="z6Mkw5s3ppo26C7y7tGK5MD8n2GqTHS582PPpeX5Xqbu2Mpz" + +# โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +# โ”‚ LOGGING UTILS โ”‚ +# โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +info() { echo -e "\e[1;34m[INFO]\e[0m $*" >&2; } +warn() { echo -e "\e[1;33m[WARN]\e[0m $*" >&2; } +error() { echo -e "\e[1;31m[ERROR]\e[0m $*" >&2; exit 1; } + +# โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +# โ”‚ SCRIPT LOOKUP FUNCTION โ”‚ +# โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +find_script() { + local script_name=$1 + local search_paths=( + "$HOME/.local/gitfieldbin" + "$HOME/.local/bin" + "$HOME/.local/gitfield" + "$HOME/.local/bin/gitfield" + "$HOME/.local/bin/gitfieldbin" + "$REPO_PATH/bin" + ) + + for path in "${search_paths[@]}"; do + if [ -f "$path/$script_name" ]; then + if [ -x "$path/$script_name" ]; then + if [[ "$path" != "$HOME"* && "$path" != "$REPO_PATH"* ]]; then + info "Using script: \e[1;31m$path/$script_name\e[0m (outside home or repo)" + else + info "Using script: $path/$script_name" + fi + echo "$path/$script_name" + return 0 + else + warn "Found $path/$script_name but it is not executable" + fi + fi + done + error "Script $script_name not found in any search path" +} + +# โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +# โ”‚ INITIAL SETUP โ”‚ +# โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +mkdir -p "$GITFIELD_DIR" + +if [ ! -f "$LOG_FILE" ]; then + echo "# Push Log for $REPO_NAME" > "$LOG_FILE" + echo "# Generated by gitfield-sync" >> "$LOG_FILE" + echo "" >> "$LOG_FILE" +fi + +# โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +# โ”‚ GENERATE GITFIELD.MD โ”‚ +# โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +generate_gitfield_md() { + info "Generating $GITFIELD_MD..." + cat > "$GITFIELD_MD" <> "$LOG_FILE" + echo " CLI: rad inspect $rid # View project details" >> "$LOG_FILE" + echo " CLI: git ls-tree -r --name-only HEAD # View file structure" >> "$LOG_FILE" + info "Logged push to $LOG_FILE: [$timestamp] $platform: RID=$rid, Peer ID=$peer_id" + else + echo "[$timestamp] $platform: $url" >> "$LOG_FILE" + info "Logged push to $LOG_FILE: [$timestamp] $platform: $url" + fi +} + +# โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +# โ”‚ EXECUTE PUSH SCRIPT โ”‚ +# โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +execute_push() { + local script_name=$1 + local platform=$2 + local url=$3 + local rid=$4 + local peer_id=$5 + local script_path + script_path=$(find_script "$script_name") || error "Failed to find $script_name" + info "Executing $platform push with script: $script_path" + if [ -x "$script_path" ]; then + pushd "$REPO_PATH" >/dev/null + "$script_path" || warn "Execution of $script_path failed, continuing..." + log_url "$platform" "$url" "$rid" "$peer_id" + git add . || warn "Nothing to add after $script_path" + git commit -m "Post-$platform sync at $TIMESTAMP" || warn "No changes to commit after $script_path" + popd >/dev/null + else + error "Script $script_path is not executable" + fi +} + +# โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +# โ”‚ RECURSIVE PUSH LOOP โ”‚ +# โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +run_push_cycle() { + local cycle_number=$1 + info "Starting push cycle $cycle_number..." + + execute_push "gitfield-local" "Local" "" "" "" + execute_push "gitfield-radicle" "Radicle" "" "$RADICLE_RID" "$RADICLE_PEER_ID" + execute_push "gitfield-remember" "Forgejo" "$FORGEJO_URL" "" "" + execute_push "gitfield-gitlab" "GitLab" "$GITLAB_URL" "" "" + execute_push "gitfield-bitbucket" "Bitbucket" "$BITBUCKET_URL" "" "" + execute_push "gitfield-github" "GitHub" "$GITHUB_URL" "" "" +} + +# โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +# โ”‚ MAIN EXECUTION โ”‚ +# โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +info "Starting gitfield-sync for $REPO_NAME..." + +if [ ! -d "$REPO_PATH/.git" ]; then + pushd "$REPO_PATH" >/dev/null + git init + git add . + git commit -m "Initial commit" || warn "Nothing to commit" + popd >/dev/null +fi + +run_push_cycle 1 +generate_gitfield_md +run_push_cycle 2 +run_push_cycle 3 + +info "โœ… gitfield-sync completed successfully." +info "๐Ÿ”— View logs: $LOG_FILE" +info "๐Ÿ”— View multi-repo manifest: $GITFIELD_MD" From 1f82309a1b6e11b1352f7b4590de2032bdcf8812 Mon Sep 17 00:00:00 2001 From: Mark Randall Havens Date: Mon, 9 Jun 2025 09:01:17 -0500 Subject: [PATCH 08/12] Post-Radicle sync at 2025-06-09 09:01:11 --- .gitfield/pushed.log | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitfield/pushed.log b/.gitfield/pushed.log index 3d2b008..db69cd9 100644 --- a/.gitfield/pushed.log +++ b/.gitfield/pushed.log @@ -165,3 +165,6 @@ CLI: rad inspect rad:z3FEj7rF8gZw9eFksCuiN43qjzrex # View project details CLI: git ls-tree -r --name-only HEAD # View file structure [2025-06-09 09:01:12] Local: +[2025-06-09 09:01:17] Radicle: RID=rad:z3FEj7rF8gZw9eFksCuiN43qjzrex, Peer ID=z6Mkw5s3ppo26C7y7tGK5MD8n2GqTHS582PPpeX5Xqbu2Mpz + CLI: rad inspect rad:z3FEj7rF8gZw9eFksCuiN43qjzrex # View project details + CLI: git ls-tree -r --name-only HEAD # View file structure From 616eb28db905c342aafae8c6b64bfebb4ebb3cf1 Mon Sep 17 00:00:00 2001 From: Mark Randall Havens Date: Mon, 9 Jun 2025 10:07:52 -0500 Subject: [PATCH 09/12] =?UTF-8?q?Local=20metadata=20link=20commit=20at=202?= =?UTF-8?q?025-06-09=2010:07:51=20=E2=80=94=20file:///home/mrhavens/git-lo?= =?UTF-8?q?cal-repos/git-sigil.git?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitfield/local.sigil.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitfield/local.sigil.md b/.gitfield/local.sigil.md index dfe7278..66eca88 100644 --- a/.gitfield/local.sigil.md +++ b/.gitfield/local.sigil.md @@ -6,26 +6,26 @@ - **Local Repo Path**: `/home/mrhavens/fieldcraft/git-sigil` - **Remote Label**: `local` - **Default Branch**: `master` -- **Repo Created**: `2025-06-09 09:01:11` +- **Repo Created**: `2025-06-09 10:07:51` --- ## ๐Ÿ“ฆ Commit Info -- **This Commit Timestamp**: `2025-06-09 09:01:11` -- **Last Commit SHA**: `57c188e282eb1654936b5f9c9167ca060f01149f` -- **Last Commit Message**: `Gitea metadata link commit at 2025-06-09 08:49:13 โ€” https://gitea.com/mrhavens/git-sigil/commit/9565283cd0ef7f7981a2d3701989c9f752a4cf06` +- **This Commit Timestamp**: `2025-06-09 10:07:51` +- **Last Commit SHA**: `1f82309a1b6e11b1352f7b4590de2032bdcf8812` +- **Last Commit Message**: `Post-Radicle sync at 2025-06-09 09:01:11` - **Last Commit Author**: `Mark Randall Havens ` -- **Last Commit Date**: `Mon Jun 9 08:49:14 2025 -0500` +- **Last Commit Date**: `Mon Jun 9 09:01:17 2025 -0500` - **This Commit URL**: `file:///home/mrhavens/git-local-repos/git-sigil.git` --- ## ๐Ÿ“Š Repo Status -- **Total Commits**: `899` -- **Tracked Files**: `118` -- **Uncommitted Changes**: `Yes` +- **Total Commits**: `902` +- **Tracked Files**: `121` +- **Uncommitted Changes**: `No` - **Latest Tag**: `None` --- @@ -48,7 +48,7 @@ - **Running in Docker**: `No` - **Running in WSL**: `Yes` - **Virtual Machine**: `wsl` -- **System Uptime**: `up 11 hours, 21 minutes` +- **System Uptime**: `up 12 hours, 28 minutes` - **MAC Address**: `00:15:5d:3d:32:5b` - **Local IP**: `172.18.207.124` - **CPU Model**: `AMD A6-3420M APU with Radeon(tm) HD Graphics` From bdcae1025757be0dae392d6318af8d97ea136977 Mon Sep 17 00:00:00 2001 From: Mark Randall Havens Date: Mon, 9 Jun 2025 10:07:55 -0500 Subject: [PATCH 10/12] Post-Local sync at 2025-06-09 10:07:51 --- .gitfield/push_log.json | 6 ++++++ .gitfield/pushed.log | 1 + 2 files changed, 7 insertions(+) diff --git a/.gitfield/push_log.json b/.gitfield/push_log.json index 33f462e..b68bc97 100644 --- a/.gitfield/push_log.json +++ b/.gitfield/push_log.json @@ -188,6 +188,12 @@ "branch": "master", "commit": "57c188e282eb1654936b5f9c9167ca060f01149f", "message": "Gitea metadata link commit at 2025-06-09 08:49:13 โ€” https://gitea.com/mrhavens/git-sigil/commit/9565283cd0ef7f7981a2d3701989c9f752a4cf06" + }, + { + "timestamp": "2025-06-09 10:07:51", + "branch": "master", + "commit": "1f82309a1b6e11b1352f7b4590de2032bdcf8812", + "message": "Post-Radicle sync at 2025-06-09 09:01:11" } ] } diff --git a/.gitfield/pushed.log b/.gitfield/pushed.log index db69cd9..b53c631 100644 --- a/.gitfield/pushed.log +++ b/.gitfield/pushed.log @@ -168,3 +168,4 @@ [2025-06-09 09:01:17] Radicle: RID=rad:z3FEj7rF8gZw9eFksCuiN43qjzrex, Peer ID=z6Mkw5s3ppo26C7y7tGK5MD8n2GqTHS582PPpeX5Xqbu2Mpz CLI: rad inspect rad:z3FEj7rF8gZw9eFksCuiN43qjzrex # View project details CLI: git ls-tree -r --name-only HEAD # View file structure +[2025-06-09 10:07:55] Local: From 39dc5d506be3549b3c3c37f8f4d1920b1ad38306 Mon Sep 17 00:00:00 2001 From: Mark Randall Havens Date: Mon, 9 Jun 2025 10:07:58 -0500 Subject: [PATCH 11/12] Post-Radicle sync at 2025-06-09 10:07:51 --- .gitfield/pushed.log | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitfield/pushed.log b/.gitfield/pushed.log index b53c631..ec5b5c1 100644 --- a/.gitfield/pushed.log +++ b/.gitfield/pushed.log @@ -169,3 +169,6 @@ CLI: rad inspect rad:z3FEj7rF8gZw9eFksCuiN43qjzrex # View project details CLI: git ls-tree -r --name-only HEAD # View file structure [2025-06-09 10:07:55] Local: +[2025-06-09 10:07:58] Radicle: RID=rad:z3FEj7rF8gZw9eFksCuiN43qjzrex, Peer ID=z6Mkw5s3ppo26C7y7tGK5MD8n2GqTHS582PPpeX5Xqbu2Mpz + CLI: rad inspect rad:z3FEj7rF8gZw9eFksCuiN43qjzrex # View project details + CLI: git ls-tree -r --name-only HEAD # View file structure From 6779a5f7311f41441fb5a5e66436b88fc0e99482 Mon Sep 17 00:00:00 2001 From: Mark Randall Havens Date: Mon, 9 Jun 2025 10:08:02 -0500 Subject: [PATCH 12/12] =?UTF-8?q?Forgejo=20metadata=20link=20commit=20at?= =?UTF-8?q?=202025-06-09=2010:08:02=20=E2=80=94=20https://remember.thefold?= =?UTF-8?q?within.earth/mrhavens/git-sigil/commit/39dc5d506be3549b3c3c37f8?= =?UTF-8?q?f4d1920b1ad38306?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitfield/remember.sigil.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.gitfield/remember.sigil.md b/.gitfield/remember.sigil.md index cfed1f6..1e3e1c5 100644 --- a/.gitfield/remember.sigil.md +++ b/.gitfield/remember.sigil.md @@ -3,28 +3,28 @@ - **Repo Name**: `git-sigil` - **Forgejo User**: `mrhavens` - **Remote URL**: [https://remember.thefoldwithin.earth/mrhavens/git-sigil](https://remember.thefoldwithin.earth/mrhavens/git-sigil) -- **Local Repo Path**: `/mnt/c/Downloads/git-sigil` +- **Local Repo Path**: `/home/mrhavens/fieldcraft/git-sigil` - **Remote Label**: `remember` - **Default Branch**: `master` -- **Repo Created**: `2025-06-07 01:41:24` +- **Repo Created**: `2025-06-09 10:08:02` --- ## ๐Ÿ“ฆ Commit Info -- **This Commit Timestamp**: `2025-06-07 01:41:24` -- **Last Commit SHA**: `16d01e72de5a17d8c5f33ea89591b34335c42bd5` -- **Last Commit Message**: `Post-Radicle sync at 2025-06-07 01:33:38` +- **This Commit Timestamp**: `2025-06-09 10:08:02` +- **Last Commit SHA**: `39dc5d506be3549b3c3c37f8f4d1920b1ad38306` +- **Last Commit Message**: `Post-Radicle sync at 2025-06-09 10:07:51` - **Last Commit Author**: `Mark Randall Havens ` -- **Last Commit Date**: `Sat Jun 7 01:41:18 2025 -0500` -- **This Commit URL**: [https://remember.thefoldwithin.earth/mrhavens/git-sigil/commit/16d01e72de5a17d8c5f33ea89591b34335c42bd5](https://remember.thefoldwithin.earth/mrhavens/git-sigil/commit/16d01e72de5a17d8c5f33ea89591b34335c42bd5) +- **Last Commit Date**: `Mon Jun 9 10:07:58 2025 -0500` +- **This Commit URL**: [https://remember.thefoldwithin.earth/mrhavens/git-sigil/commit/39dc5d506be3549b3c3c37f8f4d1920b1ad38306](https://remember.thefoldwithin.earth/mrhavens/git-sigil/commit/39dc5d506be3549b3c3c37f8f4d1920b1ad38306) --- ## ๐Ÿ“Š Repo Status -- **Total Commits**: `893` -- **Tracked Files**: `115` +- **Total Commits**: `905` +- **Tracked Files**: `121` - **Uncommitted Changes**: `No` - **Latest Tag**: `None` @@ -48,8 +48,8 @@ - **Running in Docker**: `No` - **Running in WSL**: `Yes` - **Virtual Machine**: `wsl` -- **System Uptime**: `up 23 hours, 49 minutes` -- **MAC Address**: `00:15:5d:86:d8:cc` +- **System Uptime**: `up 12 hours, 28 minutes` +- **MAC Address**: `00:15:5d:3d:32:5b` - **Local IP**: `172.18.207.124` - **CPU Model**: `AMD A6-3420M APU with Radeon(tm) HD Graphics` - **Total RAM (GB)**: `3.63`