/tycho-p2-scripts

release scripts for maven-tycho

Primary LanguageShell

=== Tycho and p2 release scripts ===
This project contains various scripts useful when building p2-repositories with tycho
or generating composite repositories.

These scripts are dual licensed EPL-1.0 and Apache-2.0

== Requirements ==
Minimum: bash and the XML:XPath perl module; ruby.
Debian package generation: requires a debian OS and apache-buildr with the deb plugin. TODO: document that if there is interest.

== Setup ==
The environment constants must defined:
#points to the unzipped extended p2 director http://www.intalio.org/public/maven2/org/eclipse/rt/EclipseRTp2HeadlessDirector/3.7.0.v20110221/EclipseRTP2DirectorExtended-3.7.0.v20110221.tar.gz
P2_DIRECTOR_HOME=~/tools/p2director-3.7.0.v20110221
MAVEN3_HOME=~/tools/maven-3.0.3

== tycho-release.sh ==
This script can be used to tag a maven-tycho build and to deploy the generated p2 repositories.
It assumes a unix environment. It requires bash and the XML:XPath perl module.

== Generate Composite Repository ==
This script generates a p2 composite repository: http://wiki.eclipse.org/Equinox/p2/Composite_Repositories_(new)
It requires ruby.

It reads the file passed as an argument: --otherurls
Each line of this file is parsed in the order that they are written:
* If the first character is '#' or if the line is blanked; the line is ignored.
* If the line contains '://' then it is assumed that the line is an absolute URL to a p2-repository. The url is appended to the children repositories
* If the line starts with BASE= it defines a new value for the current folder from which relative paths on the file system are resolved.
For example: BASE=~/p2repo/org/intalio
* If the line starts with a '/' or '~' it is assumed to be an absolute path on the file system.
* The other types of lines are assumed to be relative paths and are computed relative to the BASE directory
They can contain a glob expression for the last segment.

For each line a single repository is appended. When the line contains a glob expression, the latest version of the folders name selected is used.

An html page is generated to describe the contents of the composite repository.

The project's comes with a sample directory structure to experiment with.

== Promotion Script ==
Selects a composite repository and invoke p2-mirror to generate an aggregated standalone repository.
Support filters to remove some artifacts that should not be mirrored.


== Branch support: still to do:
Generate the deb packages before the deployment of the p2 repositories
Deploy the p2repos and the deb files at the same time.
Make an apt.sh script on the fly and execute right away for each apt-repo.
Work on the composite repo.