File size: 881 Bytes
93694bb
 
 
 
 
 
 
5e43ffd
93694bb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash

# Simple helper script to push this repo to Hugging Face.
# Assumes:
#   - You are in the repo root (same directory as this script), or
#   - `origin` remote is already set to https://huggingface.co/shahidul034/readCtrl_lambda
#   - You have configured your Hugging Face token for git authentication.
# cd /home/mshahidul/readctrl && bash push_to_hf.sh "new commit"

set -euo pipefail

REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$REPO_DIR"

# Use first argument as commit message, or a default one.
COMMIT_MSG="${1:-\"Update readCtrl repo\"}"

echo "Adding changes (respecting .gitignore)..."
git add .

if git diff --cached --quiet; then
  echo "No changes to commit. Nothing to push."
  exit 0
fi

echo "Committing with message: $COMMIT_MSG"
git commit -m "$COMMIT_MSG"

echo "Pushing to origin main..."
git push origin main

echo "Done."