Zips of recreated hello-world.git and all external repositories for testing.
This hello-world.git repo is created using the native Git for Windows
software.
Various test classes in the GitBlitSuite test suite require the presence
of the hello-world.git repo in github.com/git/ which has been missing,
hence causing many test failures in the suite. This recreation of the
hello-world.git repo aims to conform to the many test cases'
requirements in the suite, and to be checked in as part of the gitblit
repo, thus eliminates the requirement of a remote hello-world.git repo
during the test run. The repo is now stored is a zip ball in the new
src/test/data folder.
The hello-world repo's various commit IDs were hard-coded in various
test classes. These commit IDs, which must now have new values in the
recreated repo, are now extracted out to the
src/test/data/hello-world.properties file. The gitblit's build.xml is
modified to generate the HelloworldKeys.java file containing the
hello-world.properties file's key strings, in similar fashion as the
existing generation of the com.gitblit.Keys.java file. And these key
strings in HelloworldKeys.java are now used in the various test classes,
thus eliminating the hard-coding of the hello-world repo's commit IDs in
the test code.
During the test run by GitBlitSuite test suite, some repos from GitHub
were cloned and became part of the test data. These repos are now zipped
to be part of gitblit repo itself, thus eliminating the network fetch at
the start of test run which can be slow, especially with the JGit repo
cloning which is huge and time consuming. The cloned JGit repo is now
zipped and checked in to gitblit, along with the other 4 repos
(hello-world, ambition, gitective and ticgit). They will be unzipped
during the test suite run and be available in the local file system,
thus avoiding the need for some network fetch.
Special note on the zipped JGit repo: this repo is big (and growing all
the time on GitHub), and takes up about 32MB of disk space after cloning
from GitHub. I've made it smaller by resetting HEAD back to a commit of
5 years ago (with git reset --hard <commitId> command), to put it back
to roughly where/when the tests were written for it (which is not quite,
because there are tons of commit history since which can't be removed.)
The local JGit repo is then garbage-collected (with git gc --prune
--aggressive) to reduce its size to about 19MB.
Zipped it is still 17MB. This is a lot of MBs for a few tests.
So the JGit repo is not included in this commit.
Fixes #1275
5 years ago |
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400 |
- <?xml version="1.0" encoding="UTF-8"?>
- <project name="gitblit" default="compile" xmlns:mx="antlib:org.moxie" xmlns:jacoco="antlib:org.jacoco.ant">
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Retrieve Moxie Toolkit
-
- documentation @ http://gitblit-org.github.io/moxie
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <property name="moxie.version" value="0.10.0" />
- <property name="moxie.url" value="http://gitblit-org.github.io/moxie/maven" />
- <property name="moxie.jar" value="moxie-toolkit-${moxie.version}.jar" />
- <property name="moxie.dir" value="${user.home}/.moxie" />
-
- <property name="jacoco.version" value="0.8.4" />
-
- <!-- Download Moxie from it's Maven repository to user.home -->
- <mkdir dir="${moxie.dir}" />
- <get src="${moxie.url}/com/gitblit/moxie/moxie-toolkit/${moxie.version}/${moxie.jar}"
- dest="${moxie.dir}" skipexisting="true" verbose="true" />
-
- <!-- Register Moxie tasks -->
- <taskdef uri="antlib:org.moxie">
- <classpath location="${moxie.dir}/${moxie.jar}" />
- </taskdef>
-
- <!-- Project directories -->
- <property name="project.src.dir" value="${basedir}/src/main/java" />
- <property name="project.resources.dir" value="${basedir}/src/main/resources" />
- <property name="project.distrib.dir" value="${basedir}/src/main/distrib" />
-
- <!-- Tools -->
- <property name="octokit" location="${basedir}/.github/ok.sh" />
- <property name="relnoawk" location="${basedir}/src/site/templates/ghreleasenotes.awk" />
-
- <!-- GitHub user/organization name -->
- <property name="gh.org" value="gitblit-org" />
- <!-- GitHub project name -->
- <property name="gh.repo" value="gitblit" />
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Initialize Moxie and setup build properties
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="prepare">
-
- <!-- Setup Ant build from build.moxie and resolve dependencies.
- If it exists, build.properties is automatically loaded.
- Explicitly set mxroot allowing CI servers to override the default. -->
- <mx:init verbose="no" mxroot="${moxie.dir}" />
-
- <!-- Register JaCoCo tasks -->
- <taskdef uri="antlib:org.jacoco.ant">
- <classpath location="${moxie.dir}/remote/repo1.maven.org_maven2/org/jacoco/org.jacoco.ant/${jacoco.version}/org.jacoco.ant-${jacoco.version}-nodeps.jar" />
- </taskdef>
-
- <!-- Set Ant project properties -->
- <property name="release.tag" value="v${project.version}" />
- <property name="currentRelease.tag" value="v${project.releaseVersion}" />
- <property name="release.name" value="gitblit-${project.version}"/>
- <property name="distribution.zipfile" value="${release.name}.zip" />
- <property name="distribution.tgzfile" value="${release.name}.tar.gz" />
- <property name="distribution.warfile" value="${release.name}.war" />
- <property name="fedclient.zipfile" value="fedclient-${project.version}.zip" />
- <property name="manager.zipfile" value="manager-${project.version}.zip" />
- <property name="authority.zipfile" value="authority-${project.version}.zip" />
- <property name="gbapi.zipfile" value="gbapi-${project.version}.zip" />
- <property name="maven.directory" value="${basedir}/../gitblit-maven" />
- <property name="releaselog" value="${basedir}/releases.moxie" />
-
-
- <!-- Download links -->
- <property name="gh.url" value="https://github.com/${gh.org}" />
- <property name="gc.url" value="${gh.url}/gitblit/releases/download/" />
- <property name="docker.url" value="https://hub.docker.com/r/gitblit/gitblit" />
-
- <!-- Report Java version -->
- <echo>JDK version: ${ant.java.version}</echo>
- <exec executable="javac">
- <arg value="-version" />
- </exec>
- <echo>Java/JVM version: ${java.version}</echo>
- <echo>Github coordinates: ${gh.org}/${gh.repo}</echo>
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Cleanup all build artifacts and directories
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="clean" depends="prepare" description="Cleanup all build artifacts and directories">
-
- <!-- Clean build and target directories -->
- <mx:clean />
-
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Setup
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="setup" depends="prepare" description="Setup up project">
-
- <!-- copy distrib/data to project data directory -->
- <mkdir dir="${basedir}/data" />
- <copy todir="${basedir}/data" overwrite="false">
- <fileset dir="${project.distrib.dir}/data" />
- </copy>
-
- <!-- copy defaults.properties to the source directory -->
- <copy tofile="${project.src.dir}/defaults.properties" overwrite="true"
- file="${project.distrib.dir}/data/defaults.properties" />
-
- <!-- copy clientapps.json to the source directory.
- this file is only used if a local file is not provided. -->
- <copy tofile="${project.src.dir}/clientapps.json" overwrite="true"
- file="${project.distrib.dir}/data/clientapps.json" />
-
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Compile
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="compile" depends="setup" description="compiles Gitblit from source">
-
- <!-- Generate the Keys class from the defaults.properties file -->
- <mx:keys propertiesfile="${project.distrib.dir}/data/defaults.properties"
- outputclass="com.gitblit.Keys"
- todir="${project.src.dir}" />
-
- <!-- Compile project -->
- <mx:javac scope="compile" clean="true" />
-
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Report the compile dependencies on the console
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="report" depends="prepare" description="generate dependency report">
-
- <!-- Report compile dependencies to the console -->
- <mx:report scope="compile" destfile="${project.targetDirectory}/dependencies.txt" />
-
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Test
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="test" depends="compile" description="compiles Gitblit from source and runs unit tests">
-
- <!-- Generate the HelloworldKeys class from the hello-world.properties file -->
- <mx:keys propertiesfile="${basedir}/src/test/data/hello-world.properties"
- outputclass="com.gitblit.tests.HelloworldKeys"
- todir="${basedir}/src/test/java" />
-
- <!-- Compile unit tests -->
- <mx:javac scope="test" />
-
- <!-- Run unit tests -->
- <mx:test failonerror="true" />
-
- <!-- Create JaCoCo single XML report file for code coverage service. -->
- <jacoco:report>
- <executiondata>
- <file file="${project.outputDirectory}/jacoco.exec"/>
- </executiondata>
- <structure name="${project.name}">
- <classfiles>
- <fileset dir="${project.outputDirectory}/classes"/>
- </classfiles>
- <sourcefiles encoding="UTF-8">
- <fileset dir="${project.src.dir}"/>
- </sourcefiles>
- </structure>
- <xml destfile="${project.targetDirectory}/reports/coverage/jacoco.xml"/>
- </jacoco:report>
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Run Gitblit GO
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="run" depends="compile" description="Run Gitblit GO">
- <!-- copy static files -->
- <copy todir="${basedir}/build/classes" overwrite="false">
- <fileset dir="${project.resources.dir}">
- <exclude name="thumbs.db" />
- <exclude name="*.mkd" />
- </fileset>
- </copy>
-
- <!-- run the mainclass in a separate JVM -->
- <mx:run fork="true" />
-
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Build Gitblit GO
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="buildGO" depends="compile" description="Build Gitblit GO distribution">
-
- <echo>Building Gitblit GO ${project.version}</echo>
-
- <local name="go.dir"/>
- <property name="go.dir" value="${project.outputDirectory}/go"/>
- <delete dir="${go.dir}" />
-
- <local name="go.release.dir" />
- <property name="go.release.dir" value="${go.dir}/${release.name}" />
-
- <local name="webinf" />
- <property name="webinf" value="${project.compileOutputDirectory}/WEB-INF" />
-
- <prepareDataDirectory toDir="${go.release.dir}/data" />
-
- <!-- Copy the web.xml from the prototype web.xml -->
- <copy todir="${webinf}" overwrite="true">
- <fileset file="${project.src.dir}/WEB-INF/web.xml" />
- <filterset>
- <filter token="gb.version" value="${project.version}" />
- </filterset>
- </copy>
-
- <!-- Build jar -->
- <mx:jar destfile="${go.release.dir}/gitblit.jar" includeresources="true">
- <mainclass name="com.gitblit.GitBlitServer" />
- </mx:jar>
-
- <!-- Generate the docs for the GO build -->
- <generateDocs toDir="${go.release.dir}/docs" />
-
- <!-- Create GO Windows Zip deployment -->
- <mx:zip basedir="${go.dir}">
- <!-- LICENSE and NOTICE -->
- <zipfileset dir="${basedir}" prefix="${release.name}">
- <include name="LICENSE" />
- <include name="NOTICE" />
- </zipfileset>
- <!-- Windows distrib files -->
- <zipfileset dir="${project.distrib.dir}/win" prefix="${release.name}"/>
- <!-- Gitblit Authority data -->
- <zipfileset dir="${project.distrib.dir}/data/certs" prefix="${release.name}/data/certs" />
-
- <!-- include all dependencies -->
- <dependencies prefix="${release.name}/ext" />
- </mx:zip>
-
- <!-- Create GO Linux/OSX tar.gz deployment -->
- <mx:tar basedir="${go.dir}" longfile="gnu" compression="gzip">
- <!-- LICENSE and NOTICE -->
- <zipfileset dir="${basedir}" prefix="${release.name}">
- <include name="LICENSE" />
- <include name="NOTICE" />
- </zipfileset>
- <!-- Linux/OSX distrib files -->
- <tarfileset dir="${project.distrib.dir}/linux" filemode="755" prefix="${release.name}"/>
- <!-- Gitblit Authority data -->
- <zipfileset dir="${project.distrib.dir}/data/certs" prefix="${release.name}/data/certs" />
- <!-- include all dependencies -->
- <dependencies prefix="${release.name}/ext" />
- </mx:tar>
-
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Build Gitblit WAR
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="buildWAR" depends="compile" description="Build Gitblit WAR">
-
- <echo>Building Gitblit WAR ${project.version}</echo>
-
- <local name="war.dir" />
- <property name="war.dir" value="${project.outputDirectory}/war" />
- <delete dir="${war.dir}" />
-
- <local name="webinf" />
- <property name="webinf" value="${war.dir}/WEB-INF" />
-
- <!-- Generate the docs for the WAR build -->
- <generateDocs toDir="${webinf}/docs" />
-
- <!-- Prepare the data directory -->
- <prepareDataDirectory toDir="${webinf}/data" />
-
- <!-- Build the WAR web.xml from the prototype web.xml -->
- <mx:webxml sourcefile="${project.src.dir}/WEB-INF/web.xml" destfile="${webinf}/web.xml">
- <replace token="@gb.version@" value="${project.version}" />
- </mx:webxml>
-
- <!-- Gitblit jar -->
- <mx:jar destfile="${webinf}/lib/gitblit-${project.version}.jar" includeresources="false" />
-
- <!-- Build the WAR file -->
- <mx:zip basedir="${war.dir}" destfile="${project.targetDirectory}/${distribution.warfile}" compress="true" >
- <!-- Resources in root -->
- <fileset dir="${project.resources.dir}">
- <exclude name="thumbs.db" />
- <exclude name="*.mkd" />
- </fileset>
- <!-- WEB-INF directory -->
- <zipfileset prefix="WEB-INF" dir="${basedir}" >
- <include name="LICENSE" />
- <include name="NOTICE" />
- </zipfileset>
- <zipfileset prefix="WEB-INF" file="${project.compileOutputDirectory}/WEB-INF/weblogic.xml" />
- <!-- include "war" tagged dependencies -->
- <dependencies prefix="WEB-INF/lib" tag="war" />
- </mx:zip>
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Build the stand-alone, command-line Gitblit Federation Client
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="buildFederationClient" depends="compile" description="Builds the stand-alone Gitblit federation client">
- <echo>Building Gitblit Federation Client ${project.version}</echo>
-
- <!-- generate jar by traversing the class hierarchy of the specified
- classes, exclude any classes in classpath jars -->
- <mx:genjar tag="" includeresources="false" excludeClasspathJars="true"
- destfile="${project.targetDirectory}/fedclient.jar"
- excludes="**/.class, **/*.java, **/Thumbs.db, **/*.mkd, **/*.md, **/*.css, com/gitblit/wicket/**">
- <mainclass name="com.gitblit.FederationClient" />
- <class name="com.gitblit.Keys" />
- <resource file="${project.compileOutputDirectory}/log4j.properties" />
- </mx:genjar>
-
- <!-- Build the federation client zip file -->
- <mx:zip destfile="${project.targetDirectory}/${fedclient.zipfile}">
- <fileset dir="${basedir}">
- <include name="LICENSE" />
- <include name="NOTICE" />
- </fileset>
- <fileset dir="${project.targetDirectory}">
- <include name="fedclient.jar" />
- </fileset>
- <fileset dir="${project.distrib.dir}">
- <include name="federation.properties" />
- </fileset>
- <!-- include "fedclient" tagged dependencies -->
- <dependencies prefix="ext" tag="fedclient" />
- </mx:zip>
-
- <!-- Cleanup -->
- <delete file="${project.targetDirectory}/fedclient.jar" />
-
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Build the stand-alone, Gitblit Manager
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="buildManager" depends="compile" description="Builds the stand-alone Gitblit Manager">
- <echo>Building Gitblit Manager ${project.version}</echo>
-
- <!-- generate jar by traversing the class hierarchy of the specified
- classes, exclude any classes in classpath jars -->
- <mx:genjar tag="" includeResources="false" excludeClasspathJars="true"
- destfile="${project.targetDirectory}/manager.jar"
- excludes="**/.class, **/*.java, **/Thumbs.db, **/*.mkd, **/*.md, **/*.css, com/gitblit/wicket/**">
- <resource file="${project.src.dir}/com/gitblit/client/splash.png" />
- <resource file="${project.resources.dir}/gitblt-favicon.png" />
- <resource file="${project.resources.dir}/gitweb-favicon.png" />
- <resource file="${project.resources.dir}/git-orange-16x16.png" />
- <resource file="${project.resources.dir}/user_16x16.png" />
- <resource file="${project.resources.dir}/users_16x16.png" />
- <resource file="${project.resources.dir}/settings_16x16.png" />
- <resource file="${project.resources.dir}/lock_go_16x16.png" />
- <resource file="${project.resources.dir}/lock_pull_16x16.png" />
- <resource file="${project.resources.dir}/shield_16x16.png" />
- <resource file="${project.resources.dir}/federated_16x16.png" />
- <resource file="${project.resources.dir}/cold_16x16.png" />
- <resource file="${project.resources.dir}/book_16x16.png" />
- <resource file="${project.resources.dir}/bug_16x16.png" />
- <resource file="${project.resources.dir}/health_16x16.png" />
- <resource file="${project.resources.dir}/feed_16x16.png" />
- <resource file="${project.resources.dir}/bullet_feed.png" />
- <resource file="${project.resources.dir}/search-icon.png" />
- <resource file="${project.resources.dir}/commit_changes_16x16.png" />
- <resource file="${project.resources.dir}/commit_merge_16x16.png" />
- <resource file="${project.resources.dir}/commit_divide_16x16.png" />
- <resource file="${project.resources.dir}/star_16x16.png" />
- <resource file="${project.resources.dir}/mirror_16x16.png" />
- <resource file="${project.resources.dir}/blank.png" />
- <resource file="${project.src.dir}/log4j.properties" />
- <resource>
- <!-- inlcude all translations -->
- <fileset dir="${project.src.dir}/com/gitblit/wicket">
- <include name="*.properties" />
- </fileset>
- </resource>
-
- <mainclass name="com.gitblit.client.GitblitManager" />
- <class name="com.gitblit.Keys" />
- <class name="com.gitblit.client.GitblitClient" />
- <class name="com.gitblit.models.FederationModel" />
- <class name="com.gitblit.models.FederationProposal" />
- <class name="com.gitblit.models.FederationSet" />
- <manifest>
- <attribute name="SplashScreen-Image" value="splash.png" />
- </manifest>
- </mx:genjar>
-
- <!-- Build Manager Zip file -->
- <mx:zip destfile="${project.targetDirectory}/${manager.zipfile}">
- <fileset dir="${basedir}">
- <include name="LICENSE" />
- <include name="NOTICE" />
- </fileset>
- <fileset dir="${project.targetDirectory}">
- <include name="manager.jar" />
- </fileset>
- <!-- include "manager" tagged dependencies -->
- <dependencies prefix="ext" tag="manager" />
- </mx:zip>
-
- <!-- Cleanup -->
- <delete file="${project.targetDirectory}/manager.jar" />
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Build the Gitblit API client library
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="buildApiLibrary" depends="compile" description="Builds the Gitblit RPC client library">
- <echo>Building Gitblit API Library ${project.version}</echo>
-
- <local name="javadoc.dir" />
- <property name="javadoc.dir" value="${project.outputDirectory}/javadoc" />
- <delete dir="${javadoc.dir}" />
-
- <!-- Build API Library jar -->
- <mx:genjar tag="" includeResources="false" excludeClasspathJars="true"
- destfile="${project.targetDirectory}/gbapi-${project.version}.jar"
- excludes="**/.class, **/*.java, **/Thumbs.db, **/*.mkd, **/*.md, **/*.css, com/gitblit/wicket/**">
- <mainclass name="com.gitblit.client.GitblitClient" />
- <class name="com.gitblit.Keys" />
- <class name="com.gitblit.models.FederationModel" />
- <class name="com.gitblit.models.FederationProposal" />
- <class name="com.gitblit.models.FederationSet" />
- </mx:genjar>
-
- <!-- Build API sources jar -->
- <zip destfile="${project.targetDirectory}/gbapi-${project.version}-sources.jar">
- <fileset dir="${project.src.dir}" defaultexcludes="yes">
- <include name="com/gitblit/Constants.java"/>
- <include name="com/gitblit/GitBlitException.java"/>
- <include name="com/gitblit/Keys.java"/>
- <include name="com/gitblit/client/**/*.java"/>
- <include name="com/gitblit/models/**/*.java"/>
- <include name="com/gitblit/utils/**/*.java"/>
- </fileset>
- </zip>
-
- <!-- Build API JavaDoc jar -->
- <mx:javadoc destdir="${javadoc.dir}" charset="utf-8" encoding="utf-8" docencoding="utf-8" redirect="true">
- <fileset dir="${project.src.dir}" defaultexcludes="yes">
- <include name="com/gitblit/Constants.java"/>
- <include name="com/gitblit/GitBlitException.java"/>
- <include name="com/gitblit/Keys.java"/>
- <include name="com/gitblit/client/**/*.java"/>
- <include name="com/gitblit/models/**/*.java"/>
- <include name="com/gitblit/utils/**/*.java"/>
- </fileset>
- </mx:javadoc>
-
- <zip destfile="${project.targetDirectory}/gbapi-${project.version}-javadoc.jar">
- <fileset dir="${javadoc.dir}" />
- </zip>
-
- <!-- Build the API library zip file -->
- <mx:zip destfile="${project.targetDirectory}/${gbapi.zipfile}">
- <fileset dir="${basedir}">
- <include name="LICENSE" />
- <include name="NOTICE" />
- </fileset>
- <fileset dir="${project.targetDirectory}">
- <include name="gbapi-${project.version}.jar" />
- <include name="gbapi-${project.version}-sources.jar" />
- <include name="gbapi-${project.version}-javadoc.jar" />
- </fileset>
- <!-- include "api" tagged dependencies -->
- <dependencies prefix="ext" tag="api" />
- </mx:zip>
-
- <!-- Cleanup -->
- <delete>
- <fileset dir="${project.targetDirectory}">
- <include name="javadoc/**" />
- </fileset>
- </delete>
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Build the Gitblit Website
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="buildSite" depends="prepare" description="Build the Gitblit website">
-
- <echo>Building Gitblit Website ${project.version}</echo>
-
- <!-- Build Site -->
- <mx:doc googleanalyticsid="UA-24377072-1"
- minify="true" customless="custom.less">
- <structure>
- <menu name="about">
- <page name="overview" src="siteindex.mkd" out="index.html" headerLinks="false" />
- <page name="features" src="features.mkd" />
- <page name="screenshots" src="screenshots.mkd" />
- </menu>
- <menu name="documentation" pager="true" pagerPlacement="bottom" pagerLayout="justified">
- <menu name="Gitblit GO" pager="true" pagerPlacement="bottom" pagerLayout="justified">
- <page name="setup GO" src="setup_go.mkd" />
- <page name="upgrade GO" src="upgrade_go.mkd" />
- </menu>
- <divider />
- <menu name="Gitblit WAR" pager="true" pagerPlacement="bottom" pagerLayout="justified">
- <page name="setup WAR" src="setup_war.mkd" />
- <page name="upgrade WAR" src="upgrade_war.mkd" />
- </menu>
- <divider />
- <menu name="Server Configuration" pager="true" pagerPlacement="bottom" pagerLayout="justified">
- <page name="administration" src="administration.mkd" />
- <page name="authentication" src="setup_authentication.mkd" />
- <page name="push hooks" src="setup_hooks.mkd" />
- <page name="lucene indexing" src="setup_lucene.mkd" />
- <page name="reverse proxies" src="setup_proxy.mkd" />
- <page name="client app menus" src="setup_clientmenus.mkd" />
- <page name="bugtraq" src="setup_bugtraq.mkd" />
- <page name="mirrors" src="setup_mirrors.mkd" />
- <page name="scaling" src="setup_scaling.mkd" />
- <page name="fail2ban" src="setup_fail2ban.mkd" />
- <page name="filestore (Git LFS)" src="setup_filestore.mkd" />
- <divider />
- <page name="Gitblit as a viewer" src="setup_viewer.mkd" />
- </menu>
- <divider />
- <menu name="Client Usage" pager="true" pagerPlacement="bottom" pagerLayout="justified">
- <page name="using HTTP/HTTPS" src="setup_transport_http.mkd" />
- <page name="using SSH" src="setup_transport_ssh.mkd" />
- <page name="using the Eclipse plugin" src="eclipse_plugin.mkd" />
- </menu>
- <divider />
- <menu name="Tickets" pager="true" pagerPlacement="bottom" pagerLayout="justified">
- <page name="overview" src="tickets_overview.mkd" />
- <page name="using" src="tickets_using.mkd" />
- <page name="barnum" src="tickets_barnum.mkd" />
- <page name="setup" src="tickets_setup.mkd" />
- <page name="replication & advanced administration" src="tickets_replication.mkd" />
- </menu>
- <divider />
- <menu name="Plugins" pager="true" pagerPlacement="bottom" pagerLayout="justified">
- <page name="overview" src="plugins_overview.mkd" />
- <page name="extension points" src="plugins_extensions.mkd" />
- </menu>
- <divider />
- <page name="federation" src="federation.mkd" />
- <divider />
- <page name="settings" src="properties.mkd" />
- <page name="faq" src="faq.mkd" />
- <divider />
- <page name="design" src="design.mkd" />
- <page name="rpc" src="rpc.mkd" />
- </menu>
-
- <menu name="releases">
- <page name="release notes" out="releasenotes.html">
- <template src="releasecurrent.ftl" data="${releaselog}" />
- </page>
- <page name="release history" out="releases.html">
- <template src="releasehistory.ftl" data="${releaselog}" />
- </page>
- </menu>
-
- <menu name="downloads">
- <link name="Gitblit GO (Windows)" src="${gc.url}${currentRelease.tag}/gitblit-${project.releaseVersion}.zip" />
- <link name="Gitblit GO (Linux/OSX)" src="${gc.url}${currentRelease.tag}/gitblit-${project.releaseVersion}.tar.gz" />
- <link name="Gitblit WAR" src="${gc.url}${currentRelease.tag}/gitblit-${project.releaseVersion}.war" />
- <divider />
- <link name="Gitblit GO (Docker)" src="${docker.url}" />
- <divider />
- <link name="Plugins Registry" src="http://plugins.gitblit.com" />
- <divider />
- <link name="Gitblit Manager" src="${gc.url}${currentRelease.tag}/manager-${project.releaseVersion}.zip" />
- <link name="Federation Client" src="${gc.url}${currentRelease.tag}/fedclient-${project.releaseVersion}.zip" />
- <divider />
- <link name="API Library" src="${gc.url}${currentRelease.tag}/gbapi-${project.releaseVersion}.zip" />
- <divider />
- <link name="GitHub (1.9.0+)" src="https://github.com/${gh.org}/gitblit/releases" />
- <link name="Cloudsmith (1.3.0-1.8.0)" src="https://cloudsmith.io/~gitblit/repos/gitblit/groups/" />
- <divider />
- <link name="Maven Repository" src="${project.mavenUrl}" />
- </menu>
-
- <menu name="links">
- <link name="dev.gitblit.com (self-hosted)" src="https://dev.gitblit.com" />
- <divider />
- <link name="Plugins Registry" src="http://plugins.gitblit.com" />
- <divider />
- <link name="Github" src="${project.scmUrl}" />
- <link name="Issues" src="${project.issuesUrl}" />
- <link name="Discussion" src="${project.forumUrl}" />
- <link name="Twitter" src="https://twitter.com/gitblit" />
- <link name="OpenHub" src="https://www.openhub.net/p/gitblit" />
- <divider />
- <link name="Gitblit Tickets screencast" src="https://vimeo.com/86164723" />
- <link name="Gitblit SSH and Plugin Management asciicast" src="https://asciinema.org/a/9342" />
- <link name="GitMinutes #29: James Moger on Gitblit" src="http://episodes.gitminutes.com/2014/05/gitminutes-29-james-moger-on-gitblit.html" />
- <divider />
- <link name="@JamesMoger" src="https://twitter.com/JamesMoger" />
- </menu>
- <divider />
- </structure>
-
- <replace token="%GCURL%" value="${gc.url}${currentRelease.tag}/" />
- <replace token="%DOCKERURL%" value="${docker.url}" />
- <replace token="%GBLOG4JURL%" value="${gh.url}/${gh.repo}/blob/master/src/main/java/log4j.properties" />
-
- <properties token="%PROPERTIES%" file="${project.distrib.dir}/data/defaults.properties" />
-
- <regex searchPattern="\b(commit)(\s*[#]?|-){0,1}([0-9a-fA-F]{5,})\b" replacePattern="<a href='https://github.com/gitblit-org/gitblit/commit/$3'>commit $3</a>" />
- <regex searchPattern="\b(issue)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="<a href='https://github.com/gitblit-org/gitblit/issues/$3'>issue $3</a>" />
- <regex searchPattern="\b(pr|pull request)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="<a href='https://github.com/gitblit-org/gitblit/pull/$3'>pull request #$3</a>" />
- <regex searchPattern="\b(ticket)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="<a href='https://dev.gitblit.com/tickets/gitblit.git/$3'>ticket $3</a>" />
-
- <!-- Set the logo from the mx:doc resources -->
- <logo file="${project.resources.dir}/gitblt_25_white.png" />
- <favicon file="${project.resources.dir}/gitblt-favicon.png" />
-
- <resource>
- <fileset dir="${project.resources.dir}">
- <include name="lock_go_16x16.png" />
- <include name="lock_pull_16x16.png" />
- <include name="shield_16x16.png" />
- <include name="cold_16x16.png" />
- <include name="bug_16x16.png" />
- <include name="book_16x16.png" />
- <include name="blank.png" />
- <include name="federated_16x16.png" />
- <include name="arrow_page.png" />
- </fileset>
- </resource>
- </mx:doc>
-
- <!-- Copy Fancybox -->
- <mkdir dir="${project.siteTargetDirectory}/fancybox" />
- <copy todir="${project.siteTargetDirectory}/fancybox">
- <fileset dir="${project.siteSourceDirectory}/fancybox">
- <exclude name="thumbs.db" />
- </fileset>
- </copy>
-
- <!-- Generate thumbnails of screenshots -->
- <mx:thumbs input="png" output="png" maximumDimension="250"
- sourceDir="${project.siteSourceDirectory}/screenshots"
- destDir="${project.siteTargetDirectory}/thumbs" />
-
- <!-- Copy screenshots -->
- <mkdir dir="${project.siteTargetDirectory}/screenshots" />
- <copy todir="${project.siteTargetDirectory}/screenshots">
- <fileset dir="${project.siteSourceDirectory}/screenshots">
- <include name="*.png" />
- </fileset>
- </copy>
-
- </target>
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Package and deploy RELEASE artifacts to the Maven repository
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="buildMavenArtifacts" depends="buildApiLibrary">
- <mx:package />
- <mx:deploy basedir="${maven.directory}" allowsnapshots="false" />
- <mx:deploy basedir="${maven.directory}" allowsnapshots="false"
- name="Gitblit API" description="Gitblit JSON/RSS API client library"
- tags="api" artifactid="gbapi" />
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Build all binaries and site
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="buildAll" depends="buildGO,buildWAR,buildFederationClient,buildManager,buildApiLibrary,buildSite" />
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Update the gh-pages branch with the current site
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="updateGhPages" depends="prepare">
- <!-- Build gh-pages branch -->
- <mx:ghpages repositorydir="${basedir}" obliterate="true">
- <keep>
- <file name="CNAME"/>
- </keep>
- </mx:ghpages>
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Publish binaries to Bintray
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="publishBinaries" depends="prepare" description="Publish the Gitblit binaries to Bintray">
-
- <echo>Uploading Gitblit ${project.version} binaries</echo>
-
- <!-- Upload Gitblit GO Windows ZIP file -->
- <bintrayUpload
- source="${project.targetDirectory}/${distribution.zipfile}"
- target="gitblit-${project.version}.zip" />
-
- <!-- Upload Gitblit GO Linux/Unix tar.gz file -->
- <bintrayUpload
- source="${project.targetDirectory}/${distribution.tgzfile}"
- target="gitblit-${project.version}.tar.gz" />
-
- <!-- Upload Gitblit WAR file -->
- <bintrayUpload
- source="${project.targetDirectory}/${distribution.warfile}"
- target="gitblit-${project.version}.war" />
-
- <!-- Upload Gitblit FedClient -->
- <bintrayUpload
- source="${project.targetDirectory}/${fedclient.zipfile}"
- target="fedclient-${project.version}.zip" />
-
- <!-- Upload Gitblit Manager -->
- <bintrayUpload
- source="${project.targetDirectory}/${manager.zipfile}"
- target="manager-${project.version}.zip" />
-
- <!-- Upload Gitblit API Library -->
- <bintrayUpload
- source="${project.targetDirectory}/${gbapi.zipfile}"
- target="gbapi-${project.version}.zip" />
-
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Publish binaries to GitHub release
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="releaseBinaries" depends="prepare" description="Publish the Gitblit binaries to a GitHub release">
-
- <ghReleaseDraft
- releaselog="${releaselog}"
- releasetag="${release.tag}"/>
-
- <echo>Uploading Gitblit ${project.version} binaries</echo>
-
- <!-- Upload Gitblit GO Windows ZIP file -->
- <githubUpload
- source="${project.targetDirectory}/${distribution.zipfile}"
- target="gitblit-${project.version}.zip" />
-
- <!-- Upload Gitblit GO Linux/Unix tar.gz file -->
- <githubUpload
- source="${project.targetDirectory}/${distribution.tgzfile}"
- target="gitblit-${project.version}.tar.gz" />
-
- <!-- Upload Gitblit WAR file -->
- <githubUpload
- source="${project.targetDirectory}/${distribution.warfile}"
- target="gitblit-${project.version}.war" />
-
- <!-- Upload Gitblit FedClient -->
- <githubUpload
- source="${project.targetDirectory}/${fedclient.zipfile}"
- target="fedclient-${project.version}.zip" />
-
- <!-- Upload Gitblit Manager -->
- <githubUpload
- source="${project.targetDirectory}/${manager.zipfile}"
- target="manager-${project.version}.zip" />
-
- <!-- Upload Gitblit API Library -->
- <githubUpload
- source="${project.targetDirectory}/${gbapi.zipfile}"
- target="gbapi-${project.version}.zip" />
-
-
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Publish GH release draft
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="publishRelease" depends="prepare" description="Publish the GitHub release draft" >
-
- <echo>Publishing Gitblit ${project.version} release draft on GitHub for tag ${release.tag}</echo>
-
- <ghGetReleaseId
- releaseVersion="${project.version}"/>
- <exec executable="bash" logError="true" >
- <arg value="-c" />
- <arg value="${octokit} -q edit_release ${gh.org} ${gh.repo} ${ghrelease.id} tag_name='${release.tag}'"></arg>
- </exec>
- <ghPublishReleaseDraft
- releaseid="${ghrelease.id}"/>
-
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Build site and update GH pages for publishing
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="updateSite" depends="buildSite,updateGhPages" description="Update the Gitblit pages site" >
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Publish site to site hosting service
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="publishSite" depends="clean,buildSite,updateGhPages" description="Publish the Gitblit site to a host" >
-
- <echo>Uploading Gitblit ${project.version} website</echo>
-
- <mx:ftp server="${ftp.server}"
- userid="${ftp.user}"
- password="${ftp.password}"
- remotedir="${ftp.dir}"
- passive="true"
- verbose="yes">
- <fileset dir="${project.siteTargetDirectory}" />
- </mx:ftp>
- </target>
-
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Determine the release version and tag name.
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="determineReleaseVersion" depends="prepare" description="determine the release version and tag name">
- <exec executable="bash" logError="true" outputproperty="determined_release.version">
- <arg value="-c" />
- <arg value="grep '^version:' build.moxie | sed -e 's/version: *//' -e 's/-SNAPSHOT//'"></arg>
- </exec>
- <property name="determined_release.tag" value="v${determined_release.version}" />
- <echo>Release version: ${determined_release.version}</echo>
- <echo>Release tag: ${determined_release.tag}</echo>
-
- <!-- output version information for other scripts/programs to pick up -->
- <mx:if>
- <and>
- <isset property="versionInfo" />
- <not><equals arg1="${versionInfo}" arg2="" trim="true"/></not>
- </and>
- <then>
- <echo file="${basedir}/${versionInfo}">
- GBLT_RELEASE_VERSION=${determined_release.version}
- GBLT_RELEASE_TAG=${determined_release.tag}
- </echo>
- </then>
- </mx:if>
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Tag a new version and prepare for the next development cycle.
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="tagRelease" depends="prepare" description="tag a new version and prepare for the next development cycle">
- <!-- release -->
- <property name="dryrun" value="false" />
- <mx:version stage="release" dryrun="${dryrun}" />
- <property name="project.tag" value="v${project.version}" />
- <!-- commit build.moxie & releases.moxie (automatic) -->
- <mx:commit showtitle="no">
- <message>Prepare ${project.version} release</message>
- <tag name="${project.tag}">
- <message>${project.name} ${project.version} release</message>
- </tag>
- </mx:commit>
-
- <!-- output version information for other scripts/programs to pick up -->
- <mx:if>
- <and>
- <isset property="versionInfo" />
- <not><equals arg1="${versionInfo}" arg2="" trim="true"/></not>
- </and>
- <then>
- <echo file="${basedir}/${versionInfo}">
- GBLT_RELEASE_VERSION=${project.version}
- GBLT_RELEASE_TAG=${project.tag}
- </echo>
- </then>
- </mx:if>
-
- <!-- create the release process script -->
- <createReleaseScript
- projectVersion="${project.version}"
- projectTag="${project.tag}"
- projectCommitId="${project.commitId}" />
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Create the release process script from the template.
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="releaseScript" depends="prepare" description="create the release process script for a release version">
- <!-- create the release process script -->
- <createReleaseScript
- projectVersion="${project.version}"
- projectTag="${release.tag}"
- projectCommitId="${release.tag}" />
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Prepare for the next point release development cycle.
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="nextPointReleaseCycle" depends="prepare" description="prepare for the next point release development cycle">
- <!-- next cycle -->
- <mx:version stage="snapshot" incrementNumber="incremental" dryrun="${dryrun}" />
- <mx:commit showtitle="no">
- <message>Reset build identifiers for next point release cycle</message>
- </mx:commit>
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Prepare for the next minor release development cycle.
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="nextMinorReleaseCycle" depends="prepare" description="prepare for the next minor release development cycle">
- <!-- next cycle -->
- <mx:version stage="snapshot" incrementNumber="minor" dryrun="${dryrun}" />
- <mx:commit showtitle="no">
- <message>Reset build identifiers for next minor release cycle</message>
- </mx:commit>
- </target>
-
-
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Create the release process script from the template.
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <macrodef name="createReleaseScript">
- <attribute name="projectVersion" />
- <attribute name="projectTag" />
- <attribute name="projectCommitId" />
- <sequential>
- <mx:if>
- <os family="windows" />
- <then>
- <!-- Windows PowerShell script -->
- <!-- set-executionpolicy remotesigned -->
- <property name="recipe" value="release_@{projectVersion}.ps1" />
- </then>
- <else>
- <!-- Bash script -->
- <property name="recipe" value="release_@{projectVersion}.sh" />
- </else>
- </mx:if>
- <delete file="${recipe}" failonerror="false" quiet="true" verbose="false" />
- <!-- Work-around for lack of proper ant property substitution in copy -->
- <property name="dollar" value="$"/>
- <copy file="release.template" tofile="${recipe}">
- <filterset begintoken="${dollar}{" endtoken="}">
- <filter token="project.version" value="@{projectVersion}" />
- <filter token="project.commitId" value="@{projectCommitId}" />
- <filter token="project.tag" value="@{projectTag}" />
- <filter token="project.directory" value="${basedir}" />
- <filter token="maven.directory" value="${maven.directory}" />
- </filterset>
- </copy>
- <chmod file="${recipe}" perm="ugo+rx" />
- </sequential>
- </macrodef>
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Build Gitblit Docs
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <macrodef name="generateDocs">
- <attribute name="toDir"/>
- <sequential>
- <mx:doc toDir="@{toDir}" minify="true" customless="custom.less">
- <structure>
- <menu name="about">
- <page name="overview" src="siteindex.mkd" out="index.html" headerLinks="false" />
- <page name="features" src="features.mkd" />
- </menu>
- <menu name="documentation">
- <menu name="Gitblit GO" pager="true" pagerPlacement="bottom" pagerLayout="justified">
- <page name="setup GO" src="setup_go.mkd" />
- <page name="upgrade GO" src="upgrade_go.mkd" />
- </menu>
- <divider />
- <menu name="Gitblit WAR" pager="true" pagerPlacement="bottom" pagerLayout="justified">
- <page name="setup WAR" src="setup_war.mkd" />
- <page name="upgrade WAR" src="upgrade_war.mkd" />
- </menu>
- <divider />
- <menu name="Server Configuration" pager="true" pagerPlacement="bottom" pagerLayout="justified">
- <page name="administration" src="administration.mkd" />
- <page name="authentication" src="setup_authentication.mkd" />
- <page name="push hooks" src="setup_hooks.mkd" />
- <page name="lucene indexing" src="setup_lucene.mkd" />
- <page name="reverse proxies" src="setup_proxy.mkd" />
- <page name="client app menus" src="setup_clientmenus.mkd" />
- <page name="bugtraq" src="setup_bugtraq.mkd" />
- <page name="mirrors" src="setup_mirrors.mkd" />
- <page name="scaling" src="setup_scaling.mkd" />
- <page name="fail2ban" src="setup_fail2ban.mkd" />
- <page name="filestore (Git LFS)" src="setup_filestore.mkd" />
- <divider />
- <page name="Gitblit as a viewer" src="setup_viewer.mkd" />
- </menu>
- <divider />
- <menu name="Client Usage" pager="true" pagerPlacement="bottom" pagerLayout="justified">
- <page name="using HTTP/HTTPS" src="setup_transport_http.mkd" />
- <page name="using SSH" src="setup_transport_ssh.mkd" />
- <page name="using the Eclipse plugin" src="eclipse_plugin.mkd" />
- </menu>
- <divider />
- <menu name="Tickets" pager="true" pagerPlacement="bottom" pagerLayout="justified">
- <page name="overview" src="tickets_overview.mkd" />
- <page name="using" src="tickets_using.mkd" />
- <page name="barnum" src="tickets_barnum.mkd" />
- <page name="setup" src="tickets_setup.mkd" />
- <page name="replication & advanced administration" src="tickets_replication.mkd" />
- </menu>
- <divider />
- <menu name="Plugins" pager="true" pagerPlacement="bottom" pagerLayout="justified">
- <page name="overview" src="plugins_overview.mkd" />
- <page name="extension points" src="plugins_extensions.mkd" />
- </menu>
- <divider />
- <page name="federation" src="federation.mkd" />
- <divider />
- <page name="settings" src="properties.mkd" />
- <page name="faq" src="faq.mkd" />
- <divider />
- <page name="design" src="design.mkd" />
- <page name="rpc" src="rpc.mkd" />
- </menu>
-
- <menu name="changelog">
- <page name="current release" out="releasenotes.html">
- <template src="releasecurrent.ftl" data="${releaselog}" />
- </page>
- <page name="all releases" out="releases.html">
- <template src="releasehistory.ftl" data="${releaselog}" />
- </page>
- </menu>
-
- <menu name="links">
- <link name="dev.gitblit.com (self-hosted)" src="https://dev.gitblit.com" />
- <divider />
- <link name="Plugins Registry" src="http://plugins.gitblit.com" />
- <divider />
- <link name="Github" src="${project.scmUrl}" />
- <link name="Issues" src="${project.issuesUrl}" />
- <link name="Discussion" src="${project.forumUrl}" />
- <link name="Twitter" src="https://twitter.com/gitblit" />
- <link name="OpenHub" src="https://www.openhub.net/p/gitblit" />
- </menu>
- </structure>
-
- <replace token="%GCURL%" value="${gc.url}${currentRelease.tag}/" />
- <replace token="%DOCKERURL%" value="${docker.url}" />
- <replace token="%GBLOG4JURL%" value="${gh.url}/${gh.repo}/blob/master/src/main/java/log4j.properties" />
-
- <properties token="%PROPERTIES%" file="${project.distrib.dir}/data/defaults.properties" />
-
- <regex searchPattern="\b(commit)(\s*[#]?|-){0,1}([0-9a-fA-F]{5,})\b" replacePattern="<a href='https://github.com/gitblit-org/gitblit/commit/$3'>commit $3</a>" />
- <regex searchPattern="\b(issue)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="<a href='https://github.com/gitblit-org/gitblit/issues/$3'>issue $3</a>" />
- <regex searchPattern="\b(pr|pull request)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="<a href='https://github.com/gitblit-org/gitblit/pull/$3'>pull request #$3</a>" />
- <regex searchPattern="\b(ticket)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="<a href='https://dev.gitblit.com/tickets/gitblit.git/$3'>ticket $3</a>" />
-
- <!-- Set the logo from the mx:doc resources -->
- <logo file="${project.resources.dir}/gitblt_25_white.png" />
- <favicon file="${project.resources.dir}/gitblt-favicon.png" />
-
- <resource>
- <fileset dir="${project.resources.dir}">
- <include name="lock_go_16x16.png" />
- <include name="lock_pull_16x16.png" />
- <include name="shield_16x16.png" />
- <include name="cold_16x16.png" />
- <include name="bug_16x16.png" />
- <include name="book_16x16.png" />
- <include name="blank.png" />
- <include name="federated_16x16.png" />
- <include name="arrow_page.png" />
- </fileset>
- </resource>
- </mx:doc>
- </sequential>
- </macrodef>
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Macro to create a pristine data directory for the target build
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <macrodef name="prepareDataDirectory">
- <attribute name="toDir"/>
- <sequential>
- <mkdir dir="@{toDir}" />
- <copy todir="@{toDir}" overwrite="false">
- <fileset dir="${project.distrib.dir}/data">
- <include name="users.conf" />
- <include name="projects.conf" />
- <include name="defaults.properties" />
- <include name="gitblit.properties" />
- </fileset>
- </copy>
- <mkdir dir="@{toDir}/git" />
- <copy todir="@{toDir}/git" overwrite="false">
- <fileset dir="${project.distrib.dir}/data/git">
- <include name="project.mkd" />
- </fileset>
- </copy>
- <mkdir dir="@{toDir}/groovy" />
- <copy todir="@{toDir}/groovy">
- <fileset dir="${project.distrib.dir}/data/groovy">
- <include name="sendmail.groovy" />
- <include name="sendmail-html.groovy" />
- <include name="jenkins.groovy" />
- <include name="protect-refs.groovy" />
- <include name="blockpush.groovy" />
- <include name="localclone.groovy" />
- <include name="fogbugz.groovy" />
- <include name="thebuggenie.groovy" />
- <include name="fisheye.groovy" />
- <include name="redmine-fetch.groovy" />
- <include name="subgit.groovy" />
- </fileset>
- </copy>
- <mkdir dir="@{toDir}/gitignore" />
- <copy todir="@{toDir}/gitignore">
- <fileset dir="${project.distrib.dir}/data/gitignore">
- <include name="*.gitignore" />
- </fileset>
- </copy>
- </sequential>
- </macrodef>
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Macro to upload binaries to Bintray
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <macrodef name="bintrayUpload">
- <attribute name="source"/>
- <attribute name="target"/>
- <sequential>
- <echo>uploading @{source} to Bintray</echo>
- <exec executable="curl">
- <arg line="--silent --show-error -T @{source} -u${bintray.username}:${bintray.apikey} https://api.bintray.com/content/gitblit/releases/gitblit/${project.version}/@{target}"></arg>
- </exec>
- </sequential>
- </macrodef>
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Macro to create release draft on GitHub
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <macrodef name="ghReleaseDraft">
- <attribute name="releaselog" />
- <attribute name="releasetag" />
- <sequential>
- <mx:if>
- <isset property="updateRelease" />
- <then>
- <echo>updating release @{releasetag} draft on GitHub</echo>
- <exec executable="bash" logError="true" failonerror="true" outputproperty="ghrelease.id">
- <arg value="-c" />
- <arg value="${octokit} list_releases ${gh.org} ${gh.repo} _filter='.[] | "\(.name)\t\(.id)"' | grep ${project.version} | cut -f2"></arg>
- </exec>
- </then>
- <else>
- <echo>creating release @{releasetag} draft on GitHub</echo>
- <exec executable="bash" logError="true" failonerror="true" outputproperty="ghrelease.id">
- <arg value="-c" />
- <arg value="${octokit} create_release ${gh.org} ${gh.repo} @{releasetag} name=${project.version} draft=true | cut -f2"></arg>
- </exec>
- </else>
- </mx:if>
-
- <exec executable="bash" logError="true" failonerror="true" outputproperty="ghrelease.upldUrl">
- <arg value="-c" />
- <arg value="${octokit} release ${gh.org} ${gh.repo} ${ghrelease.id} _filter=.upload_url | sed 's/{.*$/?name=/'"></arg>
- </exec>
- <exec executable="bash" logError="true" failonerror="true" outputproperty="ghrelease.notes">
- <arg value="-c" />
- <arg value="cat @{releaselog} | awk -f ${relnoawk} protect=true"></arg>
- </exec>
- <exec executable="bash" logError="true" >
- <arg value="-c" />
- <arg value="${octokit} -q edit_release ${gh.org} ${gh.repo} ${ghrelease.id} tag_name='@{releasetag}' body='${ghrelease.notes}'"></arg>
- </exec>
- </sequential>
- </macrodef>
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Macro to upload binaries to GitHub
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <macrodef name="githubUpload">
- <attribute name="source"/>
- <attribute name="target"/>
- <sequential>
- <mx:if>
- <isset property="updateRelease" />
- <then>
- <echo>removing @{target} on GitHub from release ${ghrelease.id}</echo>
- <exec executable="bash" logError="true" failonerror="true">
- <arg value="-c" />
- <arg value="${octokit} release_assets ${gh.org} ${gh.repo} ${ghrelease.id} | grep @{target} | cut -f1 | xargs -L1 ${octokit} -y delete_asset ${gh.org} ${gh.repo}"></arg>
- </exec>
- </then>
- <else>
- </else>
- </mx:if>
- <echo>uploading @{source} to GitHub release ${ghrelease.id}</echo>
- <exec executable="bash" logError="true" failonerror="true" >
- <arg value="-c" />
- <arg value="${octokit} upload_asset ${ghrelease.upldUrl}@{target} @{source}"></arg>
- </exec>
- </sequential>
- </macrodef>
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Macro to publish release draft on GitHub
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <macrodef name="ghPublishReleaseDraft">
- <attribute name="releaseid"/>
- <sequential>
- <echo>publishing GitHub release draft @{releaseid}</echo>
- <exec executable="bash" logError="true" >
- <arg value="-c" />
- <arg value="${octokit} -q edit_release ${gh.org} ${gh.repo} @{releaseid} draft=false"></arg>
- </exec>
- </sequential>
- </macrodef>
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Macro to publish release draft on GitHub
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <macrodef name="ghGetReleaseId">
- <attribute name="releaseVersion"/>
- <sequential>
- <exec executable="bash" logError="true" failonerror="true" outputproperty="ghrelease.id">
- <arg value="-c" />
- <arg value="${octokit} list_releases ${gh.org} ${gh.repo} _filter='.[] | "\(.name)\t\(.tag_name)\t\(.id)"' | grep @{releaseVersion} | cut -f3"></arg>
- </exec>
- </sequential>
- </macrodef>
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Install Gitblit JAR for usage as Maven module
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="installMaven" depends="compile" description="Install Gitblit JAR as Maven module">
- <local name="project.jar" />
- <property name="project.jar" value="${project.outputDirectory}/${project.artifactId}.jar" />
- <property name="resourceFolderPrefix" value="" />
- <mx:jar destfile="${project.jar}" packageSources="true" includeresources="true" resourceFolderPrefix="${resourceFolderPrefix}" />
-
- <!-- Install Binary jar -->
- <exec executable="mvn">
- <arg value="install:install-file" />
- <arg value="-Dfile=${project.jar}" />
- <arg value="-DpomFile=${basedir}/pom.xml" />
- <arg value="-DcreateChecksum=true" />
- </exec>
-
- <!-- Install Sources jar -->
- <exec executable="mvn">
- <arg value="install:install-file" />
- <arg value="-Dfile=${project.outputDirectory}/${project.artifactId}-sources.jar" />
- <arg value="-Dclassifier=sources" />
- <arg value="-DpomFile=${basedir}/pom.xml" />
- <arg value="-DcreateChecksum=true" />
- </exec>
- </target>
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Upload Gitblit JAR to remote Maven repository
-
- build.properties:
- project.maven.repo.url = http://whatever.com/maven2
- project.maven.repo.id = whateverId
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="uploadMaven" depends="compile" description="Upload Gitblit JAR to remote Maven repository">
- <local name="project.jar" />
- <property name="project.jar" value="${project.outputDirectory}/gitblit.jar" />
- <mx:jar destfile="${project.jar}" packageSources="true" includeresources="true" />
-
- <exec executable="mvn">
- <arg value="deploy:deploy-file" />
- <arg value="-Dfile=${project.jar}" />
- <arg value="-DpomFile=${basedir}/pom.xml" />
- <arg value="-Durl=${project.maven.repo.url}" />
- <arg value="-DrepositoryId=${project.maven.repo.id}" />
- <arg value="-DcreateChecksum=true" />
- </exec>
- </target>
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Install Gitblit JAR for usage as Moxie artifact
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="installMoxie" depends="compile" description="Install Gitblit JAR as a Moxie artifact">
- <local name="project.jar" />
- <property name="project.jar" value="${project.targetDirectory}/${project.artifactId}-${project.version}.jar" />
- <property name="resourceFolderPrefix" value="" />
- <mx:jar destfile="${project.jar}" packageSources="true" includeresources="true" resourceFolderPrefix="${resourceFolderPrefix}" />
-
- <mx:install />
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Build Gitblit UI via npm
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="buildUI" description="Build Gitblit UI via npm">
- <exec executable="npm" dir="src/main/js/" failonerror="true" vmlauncher="false" searchpath="true" >
- <arg value="install" />
- </exec>
-
- <exec executable="npm" dir="src/main/js/" failonerror="true" vmlauncher="false" searchpath="true" >
- <arg value="run" />
- <arg value="build" />
- </exec>
- </target>
-
- </project>
|