Skip to content

Commit

Permalink
In progress: support for branches
Browse files Browse the repository at this point in the history
  • Loading branch information
hmalphettes committed Jun 6, 2011
1 parent 299cfe7 commit 135826a
Show file tree
Hide file tree
Showing 25 changed files with 1,348 additions and 486 deletions.
9 changes: 9 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,12 @@ 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.


79 changes: 79 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#!/bin/bash -e
# ========================================================================
# Copyright (c) 2006-2010 Intalio Inc
# ------------------------------------------------------------------------
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# and Apache License v2.0 which accompanies this distribution.
# The Eclipse Public License is available at
# http://www.eclipse.org/legal/epl-v10.html
# The Apache License v2.0 is available at
# http://www.opensource.org/licenses/apache2.0.php
# You may elect to redistribute this code under either of these licenses.
# ========================================================================
# Author hmalphettes
#
# Release script, takes care of auto-inc for buildr's Buildfile, commit tagging for svn and git
# Then invoke buildr package and deploys the generated debs in the specified repositories
#
# Load the computed build environment
# Then invoke maven or build

env_file=`pwd`
env_file="$env_file/computed-build-environment"
if [ ! -f "$env_file" ]; then
SCRIPT=$(readlink -f $0)
# Absolute path this script is in.
SCRIPTPATH=`dirname $SCRIPT`
$SCRIPTPATH/compute-environment.sh
fi
if [ ! -f "$env_file" ]; then
currentdir = `pwd`
echo "Could not find the file $currentdir/computed-build-environment was compute-environment.sh correctly executed?"
exit 127
fi
chmod +x "$env_file"
. "$env_file"

if [ ! -d "$WORKSPACE_MODULE_FOLDER" ]; then
echo "The constant WORKSPACE_MODULE_FOLDER doaes not exist. Was compute-environment.sh correctly executed?"
exit 127
fi
echo "WORKSPACE_MODULE_FOLDER=$WORKSPACE_MODULE_FOLDER"
cd "$WORKSPACE_MODULE_FOLDER"
echo "At the moment: "`pwd`

#Run the deb generation
function generate_debs() {
if [ -z "$DISABLE_DEB_GENERATION" ]; then
path_to_deb_generation_script="$SCRIPTPATH/../osgi-features-to-debian-package/generate-and-collect-osgi-debs.sh"
if [ ! -f "$path_to_deb_generation_script" ]; then
#try a second location.
path_to_deb_generation_script=$SCRIPTPATH/osgi-features-to-debian-package/generate-and-collect-osgi-debs.sh
fi
if [ ! -f "$path_to_deb_generation_script" ]; then
echo "$path_to_deb_generation_script does not exist."
echo "Unable to find the shell script in charge of generating the debian packages"
exit 2;
fi
echo "Executing $path_to_deb_generation_script"
$path_to_deb_generation_script
else
echo "No debian packages to build as the constant DEB_COLLECT_DIR is not defined."
fi
}

if [ -n "$ROOT_POM" ]; then
#update the numbers for the release
sed -i "s/<!--forceContextQualifier>.*<\/forceContextQualifier-->/<forceContextQualifier>$buildNumber<\/forceContextQualifier>/" $ROOT_POM
#### Build now
$MAVEN3_HOME/bin/mvn -f $ROOT_POM clean verify -Dmaven.repo.local=$LOCAL_REPOSITORY
else
#update the numbers for the release
sed -i "s/$buildNumberLine/VERSION_NUMBER=\"$completeVersion\"/" Buildfile
buildr package
fi

generate_debs


184 changes: 0 additions & 184 deletions buildrdeb-release.sh

This file was deleted.

Loading

0 comments on commit 135826a

Please sign in to comment.