Ticket tracker with patchset contributions
A basic issue tracker styled as a hybrid of GitHub and BitBucket issues.
You may attach commits to an existing ticket or you can push a single
commit to create a *proposal* ticket.
Tickets keep track of patchsets (one or more commits) and allow patchset
rewriting (rebase, amend, squash) by detecing the non-fast-forward
update and assigning a new patchset number to the new commits.
Ticket tracker
--------------
The ticket tracker stores tickets as an append-only journal of changes.
The journals are deserialized and a ticket is built by applying the
journal entries. Tickets are indexed using Apache Lucene and all
queries and searches are executed against this Lucene index.
There is one trade-off to this persistence design: user attributions are
non-relational.
What does that mean? Each journal entry stores the username of the
author. If the username changes in the user service, the journal entry
will not reflect that change because the values are hard-coded.
Here are a few reasons/justifications for this design choice:
1. commit identifications (author, committer, tagger) are non-relational
2. maintains the KISS principle
3. your favorite text editor can still be your administration tool
Persistence Choices
-------------------
**FileTicketService**: stores journals on the filesystem
**BranchTicketService**: stores journals on an orphan branch
**RedisTicketService**: stores journals in a Redis key-value datastore
It should be relatively straight-forward to develop other backends
(MongoDB, etc) as long as the journal design is preserved.
Pushing Commits
---------------
Each push to a ticket is identified as a patchset revision. A patchset
revision may add commits to the patchset (fast-forward) OR a patchset
revision may rewrite history (rebase, squash, rebase+squash, or amend).
Patchset authors should not be afraid to polish, revise, and rewrite
their code before merging into the proposed branch.
Gitblit will create one ref for each patchset. These refs are updated
for fast-forward pushes or created for rewrites. They are formatted as
`refs/tickets/{shard}/{id}/{patchset}`. The *shard* is the last two
digits of the id. If the id < 10, prefix a 0. The *shard* is always
two digits long. The shard's purpose is to ensure Gitblit doesn't
exceed any filesystem directory limits for file creation.
**Creating a Proposal Ticket**
You may create a new change proposal ticket just by pushing a **single
commit** to `refs/for/{branch}` where branch is the proposed integration
branch OR `refs/for/new` or `refs/for/default` which both will use the
default repository branch.
git push origin HEAD:refs/for/new
**Updating a Patchset**
The safe way to update an existing patchset is to push to the patchset
ref.
git push origin HEAD:refs/heads/ticket/{id}
This ensures you do not accidentally create a new patchset in the event
that the patchset was updated after you last pulled.
The not-so-safe way to update an existing patchset is to push using the
magic ref.
git push origin HEAD:refs/for/{id}
This push ref will update an exisitng patchset OR create a new patchset
if the update is non-fast-forward.
**Rebasing, Squashing, Amending**
Gitblit makes rebasing, squashing, and amending patchsets easy.
Normally, pushing a non-fast-forward update would require rewind (RW+)
repository permissions. Gitblit provides a magic ref which will allow
ticket participants to rewrite a ticket patchset as long as the ticket
is open.
git push origin HEAD:refs/for/{id}
Pushing changes to this ref allows the patchset authors to rebase,
squash, or amend the patchset commits without requiring client-side use
of the *--force* flag on push AND without requiring RW+ permission to
the repository. Since each patchset is tracked with a ref it is easy to
recover from accidental non-fast-forward updates.
Features
--------
- Ticket tracker with status changes and responsible assignments
- Patchset revision scoring mechanism
- Update/Rewrite patchset handling
- Close-on-push detection
- Server-side Merge button for simple merges
- Comments with Markdown syntax support
- Rich mail notifications
- Voting
- Mentions
- Watch lists
- Querying
- Searches
- Partial miletones support
- Multiple backend options
10 years ago Ticket tracker with patchset contributions
A basic issue tracker styled as a hybrid of GitHub and BitBucket issues.
You may attach commits to an existing ticket or you can push a single
commit to create a *proposal* ticket.
Tickets keep track of patchsets (one or more commits) and allow patchset
rewriting (rebase, amend, squash) by detecing the non-fast-forward
update and assigning a new patchset number to the new commits.
Ticket tracker
--------------
The ticket tracker stores tickets as an append-only journal of changes.
The journals are deserialized and a ticket is built by applying the
journal entries. Tickets are indexed using Apache Lucene and all
queries and searches are executed against this Lucene index.
There is one trade-off to this persistence design: user attributions are
non-relational.
What does that mean? Each journal entry stores the username of the
author. If the username changes in the user service, the journal entry
will not reflect that change because the values are hard-coded.
Here are a few reasons/justifications for this design choice:
1. commit identifications (author, committer, tagger) are non-relational
2. maintains the KISS principle
3. your favorite text editor can still be your administration tool
Persistence Choices
-------------------
**FileTicketService**: stores journals on the filesystem
**BranchTicketService**: stores journals on an orphan branch
**RedisTicketService**: stores journals in a Redis key-value datastore
It should be relatively straight-forward to develop other backends
(MongoDB, etc) as long as the journal design is preserved.
Pushing Commits
---------------
Each push to a ticket is identified as a patchset revision. A patchset
revision may add commits to the patchset (fast-forward) OR a patchset
revision may rewrite history (rebase, squash, rebase+squash, or amend).
Patchset authors should not be afraid to polish, revise, and rewrite
their code before merging into the proposed branch.
Gitblit will create one ref for each patchset. These refs are updated
for fast-forward pushes or created for rewrites. They are formatted as
`refs/tickets/{shard}/{id}/{patchset}`. The *shard* is the last two
digits of the id. If the id < 10, prefix a 0. The *shard* is always
two digits long. The shard's purpose is to ensure Gitblit doesn't
exceed any filesystem directory limits for file creation.
**Creating a Proposal Ticket**
You may create a new change proposal ticket just by pushing a **single
commit** to `refs/for/{branch}` where branch is the proposed integration
branch OR `refs/for/new` or `refs/for/default` which both will use the
default repository branch.
git push origin HEAD:refs/for/new
**Updating a Patchset**
The safe way to update an existing patchset is to push to the patchset
ref.
git push origin HEAD:refs/heads/ticket/{id}
This ensures you do not accidentally create a new patchset in the event
that the patchset was updated after you last pulled.
The not-so-safe way to update an existing patchset is to push using the
magic ref.
git push origin HEAD:refs/for/{id}
This push ref will update an exisitng patchset OR create a new patchset
if the update is non-fast-forward.
**Rebasing, Squashing, Amending**
Gitblit makes rebasing, squashing, and amending patchsets easy.
Normally, pushing a non-fast-forward update would require rewind (RW+)
repository permissions. Gitblit provides a magic ref which will allow
ticket participants to rewrite a ticket patchset as long as the ticket
is open.
git push origin HEAD:refs/for/{id}
Pushing changes to this ref allows the patchset authors to rebase,
squash, or amend the patchset commits without requiring client-side use
of the *--force* flag on push AND without requiring RW+ permission to
the repository. Since each patchset is tracked with a ref it is easy to
recover from accidental non-fast-forward updates.
Features
--------
- Ticket tracker with status changes and responsible assignments
- Patchset revision scoring mechanism
- Update/Rewrite patchset handling
- Close-on-push detection
- Server-side Merge button for simple merges
- Comments with Markdown syntax support
- Rich mail notifications
- Voting
- Mentions
- Watch lists
- Querying
- Searches
- Partial miletones support
- Multiple backend options
10 years ago |
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063 |
- <?xml version="1.0" encoding="UTF-8"?>
- <project name="gitblit" default="compile" xmlns:mx="antlib:org.moxie">
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Retrieve Moxie Toolkit
-
- documentation @ http://gitblit.github.io/moxie
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <property name="moxie.version" value="0.9.1" />
- <property name="moxie.url" value="http://gitblit.github.io/moxie/maven" />
- <property name="moxie.jar" value="moxie-toolkit-${moxie.version}.jar" />
- <property name="moxie.dir" value="${user.home}/.moxie" />
-
- <!-- 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" />
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 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}" />
-
- <!-- Set Ant project properties -->
- <property name="distribution.zipfile" value="gitblit-${project.version}.zip" />
- <property name="distribution.tgzfile" value="gitblit-${project.version}.tar.gz" />
- <property name="distribution.warfile" value="gitblit-${project.version}.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="express.zipfile" value="express-${project.version}.zip" />
- <property name="maven.directory" value="${basedir}/../gitblit-maven" />
-
- <!-- Download links -->
- <property name="gc.url" value="http://code.google.com/p/gitblit/downloads/detail?name=" />
- </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 gitblit.properties to the source directory.
- this file is only used for parsing setting descriptions. -->
- <copy tofile="${project.src.dir}/reference.properties" overwrite="true"
- file="${project.distrib.dir}/data/gitblit.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 properties file -->
- <mx:keys propertiesfile="${project.distrib.dir}/data/gitblit.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">
-
- <!-- Compile unit tests -->
- <mx:javac scope="test" />
-
- <!-- Run unit tests -->
- <mx:test failonerror="true" />
-
- </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}" />
-
- <prepareDataDirectory toDir="${go.dir}/data" />
-
- <!-- Build jar -->
- <mx:jar destfile="${go.dir}/gitblit.jar" includeresources="true">
- <mainclass name="com.gitblit.GitBlitServer" />
- <launcher paths="ext" />
- </mx:jar>
-
- <!-- Generate the docs for the GO build -->
- <generateDocs toDir="${go.dir}/docs" />
-
- <!-- Create GO Windows Zip deployment -->
- <mx:zip basedir="${go.dir}">
- <!-- LICENSE and NOTICE -->
- <fileset dir="${basedir}" >
- <include name="LICENSE" />
- <include name="NOTICE" />
- </fileset>
- <!-- Windows distrib files -->
- <zipfileset dir="${project.distrib.dir}/win" />
- <!-- Gitblit Authority data -->
- <zipfileset dir="${project.distrib.dir}/data/certs" prefix="data/certs" />
- <!-- include all dependencies -->
- <dependencies prefix="ext" />
- </mx:zip>
-
- <!-- Create GO Linux/OSX tar.gz deployment -->
- <mx:tar basedir="${go.dir}" longfile="gnu" compression="gzip">
- <!-- LICENSE and NOTICE -->
- <fileset dir="${basedir}" >
- <include name="LICENSE" />
- <include name="NOTICE" />
- </fileset>
- <!-- Linux/OSX distrib files -->
- <tarfileset dir="${project.distrib.dir}/linux" filemode="755" />
- <!-- Gitblit Authority data -->
- <zipfileset dir="${project.distrib.dir}/data/certs" prefix="data/certs" />
- <!-- include all dependencies -->
- <dependencies prefix="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.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, com/gitblit/wicket/**">
- <mainclass name="com.gitblit.FederationClient" />
- <class name="com.gitblit.Keys" />
- <launcher paths="ext" />
- <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 a Gitblit filesystem for deployment to RedHat OpenShift Express
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="buildExpress" depends="compile" description="Build exploded WAR file suitable for deployment to OpenShift Express">
- <echo>Building Gitblit Express for RedHat OpenShift ${project.version}</echo>
-
- <local name="express.dir" />
- <property name="express.dir" value="${project.outputDirectory}/express" />
- <delete dir="${express.dir}" />
-
- <!-- Create the OpenShift filesystem -->
- <local name="deployments.root" />
- <property name="deployments.root" value="${express.dir}/deployments/ROOT.war"/>
- <mkdir dir="${deployments.root}" />
- <touch file="${express.dir}/deployments/ROOT.war.dodeploy" />
-
- <local name="webinf" />
- <property name="webinf" value="${deployments.root}/WEB-INF" />
-
- <!-- Prepare the data directory -->
- <prepareDataDirectory toDir="${webinf}/data" />
-
- <!-- Build the Express web.xml from the prototype web.xml and gitblit.properties -->
- <!-- THIS FILE IS NOT OVERRIDDEN ONCE IT IS BUILT!!! -->
- <mx:webxml sourcefile="${project.src.dir}/WEB-INF/web.xml" destfile="${webinf}/web.xml"
- propertiesFile="${project.distrib.dir}/data/gitblit.properties"
- skip="server.*">
- <replace token="@gb.version@" value="${project.version}" />
- </mx:webxml>
-
- <!-- Gitblit classes -->
- <mx:jar destfile="${webinf}/lib/gitblit.jar" includeresources="false" />
-
- <!-- Build Express Zip file -->
- <mx:zip basedir="${express.dir}" destfile="${project.targetDirectory}/${express.zipfile}">
- <fileset dir="${basedir}">
- <include name="LICENSE" />
- <include name="NOTICE" />
- </fileset>
- <!-- README -->
- <zipfileset fullpath="README.gitblit" file="${project.siteSourceDirectory}/openshift.mkd" />
- <!-- resources -->
- <zipfileset prefix="deployments/ROOT.war" dir="${project.resources.dir}">
- <exclude name="thumbs.db" />
- <exclude name="*.mkd" />
- </zipfileset>
- <!-- include "war" tagged dependencies -->
- <dependencies prefix="deployments/ROOT.war/WEB-INF/lib" tag="war" />
- </mx:zip>
-
- </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">
- <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.GitblitManagerLauncher" />
- <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">
- <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" />
- </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}" 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>
-
- <property name="releaselog" value="${basedir}/releases.moxie" />
-
- <!-- Build Site -->
- <mx:doc googleplusid="114464678392593421684" googleanalyticsid="UA-24377072-1"
- googlePlusOne="true" 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="Gitblit Express" pager="true" pagerPlacement="bottom" pagerLayout="justified">
- <page name="setup Express" src="setup_express.mkd" />
- <page name="upgrade Express" src="upgrade_express.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" />
- <divider />
- <page name="Gitblit as a viewer" src="setup_viewer.mkd" />
- </menu>
- <divider />
- <menu name="Client Configuration" pager="true" pagerPlacement="bottom" pagerLayout="justified">
- <page name="git client setup" src="setup_client.mkd" />
- <page name="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" />
- </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>
- <divider />
- <page name="roadmap" src="roadmap.mkd" />
- </menu>
-
- <menu name="downloads">
- <link name="Gitblit GO (Windows)" src="${gc.url}gitblit-${project.releaseVersion}.zip" />
- <link name="Gitblit GO (Linux/OSX)" src="${gc.url}gitblit-${project.releaseVersion}.tar.gz" />
- <link name="Gitblit WAR" src="${gc.url}gitblit-${project.releaseVersion}.war" />
- <link name="Gitblit Express" src="${gc.url}express-${project.releaseVersion}.zip" />
- <divider />
- <link name="Gitblit Manager" src="${gc.url}manager-${project.releaseVersion}.zip" />
- <link name="Federation Client" src="${gc.url}fedclient-${project.releaseVersion}.zip" />
- <divider />
- <link name="API Library" src="${gc.url}gbapi-${project.releaseVersion}.zip" />
- </menu>
-
- <menu name="links">
- <link name="Gitblit Demo (RELEASE)" src="https://demo-gitblit.rhcloud.com" />
- <link name="Gitblit Next (SNAPSHOT)" src="https://next-gitblit.rhcloud.com" />
- <divider />
- <link name="Github" src="${project.scmUrl}" />
- <link name="Issues" src="${project.issuesUrl}" />
- <link name="Discussion" src="${project.forumUrl}" />
- <link name="Google+" src="${project.socialNetworkUrl}" />
- <link name="Ohloh" src="http://www.ohloh.net/p/gitblit" />
- </menu>
- <divider />
- </structure>
-
- <replace token="%GCURL%" value="${gc.url}" />
-
- <properties token="%PROPERTIES%" file="${project.distrib.dir}/data/gitblit.properties" />
-
- <regex searchPattern="\b(issue)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="<a href='http://code.google.com/p/gitblit/issues/detail?id=$3'>issue $3</a>" />
- <regex searchPattern="\b(pr|pull request)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="<a href='https://github.com/gitblit/gitblit/pull/$3'>pull request #$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,buildExpress,buildFederationClient,buildManager,buildApiLibrary,buildSite" />
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Update the gh-pages branch with the current site
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="updateGhPages">
- <!-- Build gh-pages branch -->
- <mx:ghpages repositorydir="${basedir}" obliterate="true" />
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Publish binaries to Google Code
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <target name="publishBinaries" depends="prepare" description="Publish the Gitblit binaries to Google Code">
-
- <echo>Uploading Gitblit ${project.version} binaries</echo>
-
- <!-- Upload Gitblit GO Windows ZIP file -->
- <mx:gcupload
- username="${googlecode.user}"
- password="${googlecode.password}"
- projectname="gitblit"
- filename="${project.targetDirectory}/${distribution.zipfile}"
- targetFilename="gitblit-${project.version}.zip"
- summary="Gitblit GO v${project.version} (standalone, integrated Gitblit server for Windows)" />
-
- <!-- Upload Gitblit GO Linux/Unix tar.gz file -->
- <mx:gcupload
- username="${googlecode.user}"
- password="${googlecode.password}"
- projectname="gitblit"
- filename="${project.targetDirectory}/${distribution.tgzfile}"
- targetFilename="gitblit-${project.version}.tar.gz"
- summary="Gitblit GO v${project.version} (standalone, integrated Gitblit server for Linux/Unix)" />
-
- <!-- Upload Gitblit WAR file -->
- <mx:gcupload
- username="${googlecode.user}"
- password="${googlecode.password}"
- projectname="gitblit"
- filename="${project.targetDirectory}/${distribution.warfile}"
- targetFilename="gitblit-${project.version}.war"
- summary="Gitblit WAR v${project.version} (standard WAR webapp for servlet containers)" />
-
- <!-- Upload Gitblit FedClient -->
- <mx:gcupload
- username="${googlecode.user}"
- password="${googlecode.password}"
- projectname="gitblit"
- filename="${project.targetDirectory}/${fedclient.zipfile}"
- targetFilename="fedclient-${project.version}.zip"
- summary="Gitblit Federation Client v${project.version} (command-line tool to clone data from federated Gitblit instances)" />
-
- <!-- Upload Gitblit Manager -->
- <mx:gcupload
- username="${googlecode.user}"
- password="${googlecode.password}"
- projectname="gitblit"
- filename="${project.targetDirectory}/${manager.zipfile}"
- targetFilename="manager-${project.version}.zip"
- summary="Gitblit Manager v${project.version} (Swing tool to remotely administer a Gitblit server)" />
-
- <!-- Upload Gitblit API Library -->
- <mx:gcupload
- username="${googlecode.user}"
- password="${googlecode.password}"
- projectname="gitblit"
- filename="${project.targetDirectory}/${gbapi.zipfile}"
- targetFilename="gbapi-${project.version}.zip"
- summary="Gitblit API Library v${project.version} (JSON RPC library to integrate with your software)" />
-
- <!-- Upload Gitblit Express for RedHat OpenShift -->
- <mx:gcupload
- username="${googlecode.user}"
- password="${googlecode.password}"
- projectname="gitblit"
- filename="${project.targetDirectory}/${express.zipfile}"
- targetFilename="express-${project.version}.zip"
- summary="Gitblit Express v${project.version} (run Gitblit on RedHat's OpenShift cloud)" />
-
- </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>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 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>
-
- <!-- create the release process script -->
- <mx:if>
- <os family="windows" />
- <then>
- <!-- Windows PowerShell script -->
- <!-- set-executionpolicy remotesigned -->
- <property name="recipe" value="release_${project.version}.ps1" />
- </then>
- <else>
- <!-- Bash script -->
- <property name="recipe" value="release_${project.version}.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="${project.version}" />
- <filter token="project.commitId" value="${project.commitId}" />
- <filter token="project.tag" value="${project.tag}" />
- <filter token="project.directory" value="${basedir}" />
- <filter token="maven.directory" value="${maven.directory}" />
- </filterset>
- </copy>
- <chmod file="${recipe}" perm="ugo+rx" />
-
- <!-- next cycle -->
- <mx:version stage="snapshot" incrementNumber="incremental" dryrun="${dryrun}" />
- <mx:commit showtitle="no">
- <message>Reset build identifiers for next development cycle</message>
- </mx:commit>
- </target>
-
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 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="Gitblit Express" pager="true" pagerPlacement="bottom" pagerLayout="justified">
- <page name="setup Express" src="setup_express.mkd" />
- <page name="upgrade Express" src="upgrade_express.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" />
- <divider />
- <page name="Gitblit as a viewer" src="setup_viewer.mkd" />
- </menu>
- <divider />
- <menu name="Client Configuration" pager="true" pagerPlacement="bottom" pagerLayout="justified">
- <page name="git client setup" src="setup_client.mkd" />
- <page name="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" />
- </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" src="releasecurrent.mkd" />
- <page name="older releases" src="releasehistory.mkd" />
- </menu>
- <menu name="links">
- <link name="Gitblit Demo (RELEASE)" src="https://demo-gitblit.rhcloud.com" />
- <link name="Gitbilt Next (SNAPSHOT)" src="https://next-gitblit.rhcloud.com" />
- <divider />
- <link name="Github" src="${project.scmUrl}" />
- <link name="Issues" src="${project.issuesUrl}" />
- <link name="Discussion" src="${project.forumUrl}" />
- <link name="Google+" src="${project.socialNetworkUrl}" />
- <link name="Ohloh" src="http://www.ohloh.net/p/gitblit" />
- </menu>
- </structure>
-
- <properties token="%PROPERTIES%" file="${project.distrib.dir}/data/gitblit.properties" />
-
- <regex searchPattern="\b(issue)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="<a href='http://code.google.com/p/gitblit/issues/detail?id=$3'>issue $3</a>" />
- <regex searchPattern="\b(pr|pull request)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="<a href='https://github.com/gitblit/gitblit/pull/$3'>pull request #$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="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>
- </sequential>
- </macrodef>
-
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Macro to upload binaries to GoogleCode
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
- <macrodef name="googleUpload">
- <attribute name="sourceFile"/>
- <attribute name="targetFile"/>
- <attribute name="description"/>
- <sequential>
- <gcupload
- username="${googlecode.user}"
- password="${googlecode.password}"
- projectname="gitblit"
- filename="${project.targetDirectory}/@{sourceFile}"
- targetfilename="@{targetFile}"
- summary="@{description}"
- labels="Featured, Type-Package, OpSys-All" />
- </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}/gitblit.jar" />
- <property name="resourceFolderPrefix" value="" />
- <mx:jar destfile="${project.jar}" includeresources="true" resourceFolderPrefix="${resourceFolderPrefix}" />
-
- <exec executable="mvn">
- <arg value="install:install-file" />
- <arg value="-Dfile=${project.jar}" />
- <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}" 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>
-
- </project>
|