Revert to v1_candidate #1
.allspice
@ -1,22 +1,21 @@
|
||||
#!/bin/sh
|
||||
exit 0
|
||||
# echo "[ ] Running pre-push hook..."
|
||||
#!/bin/bash
|
||||
echo "[ ] Running pre-push hook..."
|
||||
|
||||
# # Step 3: Push changes to SVN
|
||||
# git svn dcommit || { echo "[ ] SVN sync failed!"; exit 1; }
|
||||
# Step 3: Push changes to SVN
|
||||
git svn dcommit || { echo "[ ] SVN sync failed!"; exit 1; }
|
||||
|
||||
# # Define colors
|
||||
# RED='\033[0;31m'
|
||||
# GREEN='\033[0;32m'
|
||||
# NC='\033[0m' # No Color
|
||||
# Define colors
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
|
||||
# # Step 5: Push changes **only once** after ensuring sync
|
||||
# echo "[ ] Pushing to Git..."
|
||||
# git push --no-verify origin git-svn || { echo "Push failed!"; exit 1; }
|
||||
# Step 5: Push changes **only once** after ensuring sync
|
||||
echo "[ ] Pushing to Git..."
|
||||
git push --no-verify origin git-svn || { echo "Push failed!"; exit 1; }
|
||||
|
||||
# echo "[ ] Successfully synced to SVN and pushed to Git!"
|
||||
# echo " "
|
||||
# echo -e "${GREEN}ignore the following error message ${NC}"
|
||||
# echo -e "${GREEN}error: failed to push some refs to https://your allspice server/your organization/your repo.git ${NC}"
|
||||
# exit 1
|
||||
echo "[ ] Successfully synced to SVN and pushed to Git!"
|
||||
echo " "
|
||||
echo -e "${GREEN}ignore the following error message ${NC}"
|
||||
echo -e "${GREEN}error: failed to push some refs to https://your allspice server/your organization/your repo.git ${NC}"
|
||||
exit 1
|
||||
|
@ -186,25 +186,14 @@ log_header "Checking out git-svn branch" cyan
|
||||
git checkout git-svn
|
||||
git push
|
||||
|
||||
|
||||
# Setup hooks
|
||||
log_header "Set core.hooksPath to .git/hooks" cyan
|
||||
git config --local core.hooksPath .git/hooks
|
||||
|
||||
log_header "Downloading push alias wrapper" cyan
|
||||
curl -L -o $USERPROFILE/allspice/$REPO_NAME/.allspice/git-push-custom.sh https://hub.allspice.io/AllSpice-Demos/AllSpice-Loves-SVN-Monorepos/raw/branch/main/.allspice/git-push-custom.sh
|
||||
log_header "Downloading pre-push hook" cyan
|
||||
curl -L -o $USERPROFILE/allspice/$REPO_NAME/.git/hooks/pre-push https://hub.allspice.io/AllSpice-Demos/AllSpice-Loves-SVN-Monorepos/raw/branch/main/.allspice/pre-push
|
||||
|
||||
log_header "Making push alias wrapper executable" cyan
|
||||
chmod +x $USERPROFILE/allspice/$REPO_NAME/.allspice/git-push-custom.sh
|
||||
|
||||
log_header "Apply alias to push, push now runs git-push-custom.sh" cyan
|
||||
git config --local alias.push '!.allspice/git-push-custom.sh'
|
||||
|
||||
# log_header "Downloading pre-push hook" cyan
|
||||
# curl -L -o $USERPROFILE/allspice/$REPO_NAME/.git/hooks/pre-push https://hub.allspice.io/AllSpice-Demos/AllSpice-Loves-SVN-Monorepos/raw/branch/main/.allspice/pre-push
|
||||
|
||||
# log_header "Making pre-push hook executable" cyan
|
||||
# chmod +x $USERPROFILE/allspice/$REPO_NAME/.git/hooks/pre-push
|
||||
log_header "Making pre-push hook executable" cyan
|
||||
chmod +x $USERPROFILE/allspice/$REPO_NAME/.git/hooks/pre-push
|
||||
|
||||
log_header "Downloading fetch-svn.bat to $USERPROFILE/allspice/$REPO_NAME" cyan
|
||||
curl -L -o $USERPROFILE/allspice/$REPO_NAME/fetch-svn.bat https://hub.allspice.io/AllSpice-Demos/AllSpice-Loves-SVN-Monorepos/raw/branch/main/.allspice/fetch-svn.bat
|
||||
|
Loading…
Reference in New Issue
Block a user