|
806 | 806 | Update the gh-pages branch with the current site |
807 | 807 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
808 | 808 | --> |
809 | | - <target name="updateGhPages" depends="buildSite"> |
| 809 | + <target name="updateGhPages"> |
810 | 810 | <!-- Build gh-pages branch --> |
811 | 811 | <mx:ghpages repositorydir="${basedir}" obliterate="true" /> |
812 | 812 | </target> |
|
817 | 817 | Publish binaries to Google Code |
818 | 818 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
819 | 819 | --> |
820 | | - <target name="publishBinaries" depends="clean,buildGO,buildWAR,buildExpress,buildFederationClient,buildManager,buildApiLibrary" description="Publish the Gitblit binaries to Google Code"> |
| 820 | + <target name="publishBinaries" description="Publish the Gitblit binaries to Google Code"> |
821 | 821 |
|
822 | 822 | <echo>Uploading Gitblit ${project.version} binaries</echo> |
823 | 823 |
|
|
869 | 869 | <!-- |
870 | 870 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
871 | 871 | Publish site to site hosting service |
872 | | - You must add ext/commons-net-1.4.0.jar to your ANT classpath. |
873 | 872 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
874 | 873 | --> |
875 | | - <target name="publishSite" depends="clean,buildSite,updateGhPages" description="Publish the Gitblit site to a webserver (requires ext/commons-net-1.4.0.jar)" > |
| 874 | + <target name="publishSite" depends="clean,buildSite,updateGhPages" description="Publish the Gitblit site to a host" > |
876 | 875 |
|
877 | 876 | <echo>Uploading Gitblit ${project.version} website</echo> |
878 | 877 |
|
879 | | - <ftp server="${ftp.server}" |
| 878 | + <mx:ftp server="${ftp.server}" |
880 | 879 | userid="${ftp.user}" |
881 | 880 | password="${ftp.password}" |
882 | 881 | remotedir="${ftp.dir}" |
883 | 882 | passive="true" |
884 | 883 | verbose="yes"> |
885 | 884 | <fileset dir="${project.siteTargetDirectory}" /> |
886 | | - </ftp> |
| 885 | + </mx:ftp> |
887 | 886 | </target> |
888 | 887 |
|
889 | 888 |
|
890 | | - <!-- |
891 | | - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
892 | | - Compile from source, publish binaries, and build & deploy site |
893 | | - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
894 | | - --> |
895 | | - <target name="publishAll" depends="publishBinaries,publishSite" /> |
896 | | - |
897 | | - |
898 | 889 | <!-- |
899 | 890 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
900 | 891 | Tag a new version and prepare for the next development cycle. |
|
904 | 895 | <!-- release --> |
905 | 896 | <property name="dryrun" value="false" /> |
906 | 897 | <mx:version stage="release" dryrun="${dryrun}" /> |
| 898 | + <property name="project.tag" value="v${project.version}" /> |
907 | 899 | <!-- commit build.moxie & releases.moxie (automatic) --> |
908 | 900 | <mx:commit showtitle="no"> |
909 | 901 | <message>Prepare ${project.version} release</message> |
910 | | - <tag name="v${project.version}"> |
| 902 | + <tag name="${project.tag}"> |
911 | 903 | <message>${project.name} ${project.version} release</message> |
912 | 904 | </tag> |
913 | 905 | </mx:commit> |
914 | 906 |
|
| 907 | + <!-- create the release process script --> |
| 908 | + <mx:if> |
| 909 | + <os family="windows" /> |
| 910 | + <then> |
| 911 | + <!-- Windows PowerShell script --> |
| 912 | + <!-- set-executionpolicy remotesigned --> |
| 913 | + <property name="recipe" value="release_${project.version}.ps1" /> |
| 914 | + </then> |
| 915 | + <else> |
| 916 | + <!-- Bash script --> |
| 917 | + <property name="recipe" value="release_${project.version}.sh" /> |
| 918 | + </else> |
| 919 | + </mx:if> |
| 920 | + <delete file="${recipe}" failonerror="false" quiet="true" verbose="false" /> |
| 921 | + <!-- Work-around for lack of proper ant property substitution in copy --> |
| 922 | + <property name="dollar" value="$"/> |
| 923 | + <copy file="release.template" tofile="${recipe}"> |
| 924 | + <filterset begintoken="${dollar}{" endtoken="}"> |
| 925 | + <filter token="project.version" value="${project.version}" /> |
| 926 | + <filter token="project.commitId" value="${project.commitId}" /> |
| 927 | + <filter token="project.tag" value="${project.tag}" /> |
| 928 | + </filterset> |
| 929 | + </copy> |
| 930 | + <chmod file="${recipe}" perm="ugo+rx" /> |
| 931 | + |
915 | 932 | <!-- next cycle --> |
916 | 933 | <mx:version stage="snapshot" incrementNumber="incremental" dryrun="${dryrun}" /> |
917 | 934 | <mx:commit showtitle="no"> |
918 | 935 | <message>Reset build identifiers for next development cycle</message> |
919 | | - </mx:commit> |
| 936 | + </mx:commit> |
920 | 937 | </target> |
921 | 938 |
|
922 | 939 |
|
|
0 commit comments