Spaces:
Sleeping
Sleeping
Deploy Bot
Claude
feat: industry-grade AI mastering (reference matching + genre + multiband limiter)
ad1aade Download scripts/push_to_github.sh from riad777/ai-audio-mastering: direct link, hf CLI and curl.
- Browser
- Download file 2.25 kB
-
https://huggingface.co/spaces/riad777/ai-audio-mastering/resolve/main/scripts/push_to_github.sh
- Command line
-
hf download hf://spaces/riad777/ai-audio-mastering/scripts/push_to_github.sh
-
curl -L -o push_to_github.sh https://huggingface.co/spaces/riad777/ai-audio-mastering/resolve/main/scripts/push_to_github.sh
2.25 kB
| # ----------------------------------------------------------------------------- | |
| # push_to_github.sh | |
| # ----------------------------------------------------------------------------- | |
| # Initialize a git repo, commit everything, and push to GitHub. | |
| # | |
| # Designed to be runnable from a cloud IDE on iPhone (GitHub Codespaces, | |
| # Gitpod, StackBlitz, etc.) β the only inputs are the GitHub username and | |
| # a fine-grained Personal Access Token with `contents: write` scope on | |
| # the target repo. | |
| # | |
| # Usage: | |
| # GITHUB_USER="yourname" GITHUB_TOKEN="ghp_xxx" ./scripts/push_to_github.sh | |
| # | |
| # Prerequisites: repo must already exist on GitHub (empty is fine). | |
| # Create it at https://github.com/new β name: ai-audio-mastering, no README, | |
| # no .gitignore, no license. Public or private, your choice. | |
| # ----------------------------------------------------------------------------- | |
| set -euo pipefail | |
| REPO_NAME="${REPO_NAME:-ai-audio-mastering}" | |
| GITHUB_USER="${GITHUB_USER:?Error: GITHUB_USER env var required}" | |
| GITHUB_TOKEN="${GITHUB_TOKEN:?Error: GITHUB_TOKEN env var required}" | |
| # Move to repo root (one level up from scripts/) | |
| cd "$(dirname "$0")/.." | |
| if [ ! -d .git ]; then | |
| echo "β Initializing git repo" | |
| git init -b main | |
| git config user.name "${GITHUB_USER}" | |
| git config user.email "${GITHUB_USER}@users.noreply.github.com" | |
| fi | |
| echo "β Staging files (respects .gitignore)" | |
| git add . | |
| # Skip commit if there are no new changes | |
| if git diff --cached --quiet; then | |
| echo "β No changes to commit" | |
| else | |
| echo "β Committing" | |
| git commit -m "Deploy: $(date -u +%Y-%m-%dT%H:%M:%SZ)" | |
| fi | |
| REMOTE_URL="https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/${GITHUB_USER}/${REPO_NAME}.git" | |
| if ! git remote get-url origin >/dev/null 2>&1; then | |
| echo "β Adding origin remote" | |
| git remote add origin "$REMOTE_URL" | |
| else | |
| echo "β Updating origin remote URL" | |
| git remote set-url origin "$REMOTE_URL" | |
| fi | |
| echo "β Pushing to GitHub (branch: main)" | |
| git push -u origin main | |
| echo "" | |
| echo "β Pushed successfully" | |
| echo " Repo: https://github.com/${GITHUB_USER}/${REPO_NAME}" | |
| echo "" | |
| echo "Next: open https://huggingface.co/new-space and follow the README's" | |
| echo " 'Deploy in 5 minutes from your iPhone' section." |