A shell script to create "deploy" and "restore" folders based off of a git diff of 2 branches.
-
Open up a shell terminal, and make a new directory:
mkdir new_folder
-
Now move to that directory:
cd new_folder
-
Checkout the project from git:
git clone git://github.com/skratchdot/Git-Diff-Build-Script.git
-
Now move to the build directory:
cd Git-Diff-Build-Script/build/
-
Run the shell script:
git_diff_build.sh
-
When prompted, enter the following information:
Input the name of the build directory: my_build Input the name of the source/deployment branch: origin/dev Input the name of the destination/restore branch: origin/prod
-
Now the "DEPLOY" and "RESTORE" directories have been created. Check them out:
cd my_build ls -la
-
Make sure you have Eclipse with eGit installed. Clone the following repository:
git://github.com/skratchdot/Git-Diff-Build-Script.git
NOTE: instructions for eGit are found here:
http://wiki.eclipse.org/EGit/User_Guide#Starting_from_existing_Git_Repositories
-
Once the project is checked out in Eclipse, expand the "build" directory.
-
Open the git_diff_build.xml file. Make sure "bash" property is set correctly, and save the file:
Win32: Win64: UNIX:
-
Now you can run the ant build. For the "Eclipse Refresh" to work properly, you need to run the build in the same JRE as Eclipse. To do this:
a) right-click on the "git_diff_build.xml" file. b) Choose "Run As"->"External Tools Configurations". c) In the new window that pops open, click on the "JRE" tab. d) Click the radio button: "Run in the same JRE as the workspace". e) Now click the "RUN" button.