Strabon

view scripts/update-debian-version.sh @ 1499:8e6437ba6ba2

[maven-release-plugin] prepare for next development iteration
author Babis Nikolaou <charnik@di.uoa.gr>
date Wed Mar 11 20:30:53 2015 +0200 (2015-03-11)
parents fdbcb246115b
children
line source
1 #!/bin/bash
3 #
4 # This Source Code Form is subject to the terms of the Mozilla Public
5 # License, v. 2.0. If a copy of the MPL was not distributed with this
6 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 #
8 # Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015 Pyravlos Team
9 #
10 # http://www.strabon.di.uoa.gr/
11 #
13 #
14 # Script for updating the version field in the control file that is needed
15 # by the jdeb plugin when generating the Strabon .deb file. It is run by maven
16 # when the jdeb goal is invoked. This is done mainly during the package phase.
17 # From command-line, it is done simply by executing command
18 # `mvn -Ddebian=true package'.
19 #
20 # It should be run without arguments from inside the `endpoint-exec' or
21 # `runtime' directories. See also the respective `pom.xml' files in these
22 # directories.
23 #
24 # Author: Charalampos (Babis) Nikolaou <charnik@di.uoa.gr>
25 #
27 VERSION=`grep version pom.xml | head -1 | sed 's/\(.*\)<version>\(.*\)<\/version>/\2/'`
28 INPUT_FILE=./src/deb/control/control
30 BAK=
32 # in Mac OS X, sed expects a suffix for the bak file (when done in place)
33 if test `uname` = "Darwin"; then
34 BAK='.bak'
35 fi
37 sed -i ${BAK} "s/^Version.*$/Version: ${VERSION}/" "${INPUT_FILE}"
39 # remove the backup file
40 if ! test -z "${BAK}"; then
41 rm -f "${INPUT_FILE}${BAK}"
42 fi