Created
January 14, 2013 04:03
-
-
Save mrdon/4527683 to your computer and use it in GitHub Desktop.
Restore git directory for heroku builds
This file contains hidden or 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
<build> | |
.... | |
<profiles> | |
<profile> | |
<id>git</id> | |
<activation> | |
<file> | |
<missing>${basedir}/.git</missing> | |
</file> | |
</activation> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>exec-maven-plugin</artifactId> | |
<version>1.2.1</version> | |
<executions> | |
<execution> | |
<phase>validate</phase> | |
<id>clone-repo</id> | |
<goals> | |
<goal>exec</goal> | |
</goals> | |
<configuration> | |
<executable>git</executable> | |
<arguments> | |
<argument>clone</argument> | |
<argument>-n</argument> | |
<argument>https://bitbucket.org/mrdon/weapon-m.git</argument> | |
<argument>${project.build.directory}/checkout</argument> | |
</arguments> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
<plugin> | |
<artifactId>maven-antrun-plugin</artifactId> | |
<version>1.7</version> | |
<executions> | |
<execution> | |
<phase>validate</phase> | |
<goals> | |
<goal>run</goal> | |
</goals> | |
<configuration> | |
<tasks> | |
<copy todir="${basedir}/.git"> | |
<fileset dir="${project.build.directory}/checkout/.git"/> | |
</copy> | |
</tasks> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> | |
</profile> | |
</profiles> | |
... | |
</build> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment