Permalink
Browse files

added build.xml and release script

  • Loading branch information...
1 parent c4c8f2e commit 7979776b2ed602f2eee6a0e64062ba980eb1b497 @burtbeckwith burtbeckwith committed Apr 26, 2013
Showing with 65 additions and 0 deletions.
  1. +56 −0 build.xml
  2. +9 −0 release.sh
View
@@ -0,0 +1,56 @@
+<project name='hibernate' default='package'>
+
+ <condition property='grails' value='grails.bat'>
+ <os family='windows' />
+ </condition>
+ <property name='grails' value='grails' />
+
+ <macrodef name='grails'>
+ <attribute name='action' />
+ <attribute name='environment' default='dev' />
+ <element name='args' optional='true' />
+ <sequential>
+ <exec executable='${grails}' failonerror='true'>
+ <args />
+ <arg value='@{environment}' />
+ <arg value='@{action}' />
+ </exec>
+ </sequential>
+ </macrodef>
+
+ <target name='clean' description='Cleans generated resources'>
+ <grails action='clean' />
+ <delete><fileset dir='.' includes='*.log*' /></delete>
+ <delete><fileset dir='target' includes='*.log*' /></delete>
+
+ <mkdir dir='grails-app/conf/spring' />
+ </target>
+
+ <target name='test' description='Run unit tests' depends='clean'>
+ <delete file='target/stacktrace.log' />
+ <grails action='test-app' environment='test' />
+ </target>
+
+ <target name='package' description='Package the plugin'
+ depends='test, doPackage, post-package-cleanup' />
+
+ <target name='doPackage'>
+ <grails action='package-plugin' />
+ </target>
+
+ <target name='post-package-cleanup' description='Deletes unneeded folders'>
+ <delete dir='grails-app/conf/hibernate'/>
+ <delete dir='grails-app/conf/spring'/>
+ <delete dir='grails-app/controllers'/>
+ <delete dir='grails-app/domain'/>
+ <delete dir='grails-app/i18n'/>
+ <delete dir='grails-app/services'/>
+ <delete dir='grails-app/taglib'/>
+ <delete dir='grails-app/utils'/>
+ <delete dir='grails-app/views'/>
+ <delete dir='lib'/>
+ <delete dir='test/integration'/>
+ <delete dir='web-app'/>
+ </target>
+
+</project>
View
@@ -0,0 +1,9 @@
+rm -rf target/release
+mkdir target/release
+cd target/release
+git clone git@github.com:grails-plugins/grails-hibernate-plugin.git
+cd grails-hibernate-plugin
+grails clean
+grails compile
+#grails publish-plugin --noScm --snapshot --stacktrace
+grails publish-plugin --noScm --stacktrace

0 comments on commit 7979776

Please sign in to comment.