Spaces:
Running
Running
UPDATE
Browse files- release.sh +15 -0
release.sh
CHANGED
@@ -39,5 +39,20 @@ git commit -m "chore: update build artifacts - $TIMESTAMP"
|
|
39 |
echo "Pushing changes to remote..."
|
40 |
git push
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
echo "Release completed successfully!"
|
43 |
echo "Build artifacts have been committed and pushed to remote repository"
|
|
|
39 |
echo "Pushing changes to remote..."
|
40 |
git push
|
41 |
|
42 |
+
# Get git remote URL and generate HF Space short link
|
43 |
+
echo "Generating Hugging Face Space link..."
|
44 |
+
GIT_URL=$(git remote get-url origin)
|
45 |
+
echo "Git remote URL: $GIT_URL"
|
46 |
+
|
47 |
+
# Extract repo path from HF Space URL and generate short link
|
48 |
+
if [[ $GIT_URL == *"huggingface.co"* ]]; then
|
49 |
+
# Extract the repo path (remove .git suffix if present)
|
50 |
+
REPO_PATH=$(echo "$GIT_URL" | sed -E 's|.*huggingface\.co/spaces/([^/]+/[^/]+)(\.git)?.*|\1|')
|
51 |
+
HF_SHORT_LINK="https://hf.co/spaces/$REPO_PATH"
|
52 |
+
echo "🚀 Hugging Face Space: $HF_SHORT_LINK"
|
53 |
+
else
|
54 |
+
echo "Note: This doesn't appear to be a Hugging Face Space repository"
|
55 |
+
fi
|
56 |
+
|
57 |
echo "Release completed successfully!"
|
58 |
echo "Build artifacts have been committed and pushed to remote repository"
|