Git+SVN steps/script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update from SVN repo | |
svn up | |
# Commit the updates into Git repo, using the last revision id of SVN | |
git add .; git commit -m r`svn info $url | grep 'Last Changed Rev' | awk '{ print $4; }'` -n | |
# Merge the feature branch, after CR | |
git merge origin/FEATURE-BRANCH | |
# Run grunt or any pre-svn-commit steps | |
grunt | |
# See what is getting committed, just to make sure | |
svn st | |
# Add any newly added files that are not yet tracked by SVN | |
svn add file1 file2 | |
# OR if Git and SVN are in total sync, and no untracked files exists that should not be committed to SVN: | |
svn st | awk '/\?/ {print $2}' | xargs svn add | |
# Commit to SVN | |
svn ci -m '[Ticket-ID] Ticket description' | |
# OR, if jira-cli is installed and configured correctly: | |
svn ci -m "`jira-cli view TICKET-ID --format '%key - %summary'`" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment