increment-spec-versions
author Jan Lahoda <jlahoda@netbeans.org>
Mon, 12 Mar 2012 21:10:53 +0100
branchseparate-by-function-cleanup
changeset 746 fa3421a27e19
parent 475 f771af6023ca
permissions -rwxr-xr-x
Merged into trunk
jlahoda@72
     1
#!/bin/bash
jlahoda@72
     2
#
jlahoda@72
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
jlahoda@72
     4
#
jlahoda@72
     5
# Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
jlahoda@72
     6
#
jlahoda@72
     7
# The contents of this file are subject to the terms of either the GNU
jlahoda@72
     8
# General Public License Version 2 only ("GPL") or the Common
jlahoda@72
     9
# Development and Distribution License("CDDL") (collectively, the
jlahoda@72
    10
# "License"). You may not use this file except in compliance with the
jlahoda@72
    11
# License. You can obtain a copy of the License at
jlahoda@72
    12
# http://www.netbeans.org/cddl-gplv2.html
jlahoda@72
    13
# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
jlahoda@72
    14
# specific language governing permissions and limitations under the
jlahoda@72
    15
# License.  When distributing the software, include this License Header
jlahoda@72
    16
# Notice in each file and include the License file at
jlahoda@72
    17
# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
jlahoda@72
    18
# particular file as subject to the "Classpath" exception as provided
jlahoda@72
    19
# by Sun in the GPL Version 2 section of the License file that
jlahoda@72
    20
# accompanied this code. If applicable, add the following below the
jlahoda@72
    21
# License Header, with the fields enclosed by brackets [] replaced by
jlahoda@72
    22
# your own identifying information:
jlahoda@72
    23
# "Portions Copyrighted [year] [name of copyright owner]"
jlahoda@72
    24
#
jlahoda@72
    25
# Contributor(s):
jlahoda@72
    26
#
jlahoda@72
    27
# The Original Software is the DocSup module.
jlahoda@72
    28
# The Initial Developer of the Original Software is Jan Lahoda.
jlahoda@72
    29
# Portions created by Jan Lahoda_ are Copyright (C) 2002,2003.
jlahoda@72
    30
# All Rights Reserved.
jlahoda@72
    31
#
jlahoda@72
    32
# If you wish your version of this file to be governed by only the CDDL
jlahoda@72
    33
# or only the GPL Version 2, indicate your decision by adding
jlahoda@72
    34
# "[Contributor] elects to include this software in this distribution
jlahoda@72
    35
# under the [CDDL or GPL Version 2] license." If you do not indicate a
jlahoda@72
    36
# single choice of license, a recipient has the option to distribute
jlahoda@72
    37
# your version of this file under either the CDDL, the GPL Version 2 or
jlahoda@72
    38
# to extend the choice of license to its licensees as provided above.
jlahoda@72
    39
# However, if you add GPL Version 2 code and therefore, elected the GPL
jlahoda@72
    40
# Version 2 license, then the option applies only if the new code is
jlahoda@72
    41
# made subject to such option by the copyright holder.
jlahoda@72
    42
#
jlahoda@72
    43
# Contributor(s): Jan Lahoda.
jlahoda@72
    44
#
jlahoda@516
    45
NEW_VERSION=1.16
jlahoda@72
    46
for manifest in `find . -type f -name "manifest.mf"`; do
jlahoda@72
    47
    mv $manifest $manifest.old
jlahoda@72
    48
    sed -e "s/OpenIDE-Module-Specification-Version: .*$/OpenIDE-Module-Specification-Version: $NEW_VERSION/" <$manifest.old >$manifest
jlahoda@72
    49
done;
jlahoda@72
    50
jlahoda@72
    51
for properties in `find . -type f -name "project.properties"`; do
jlahoda@72
    52
    mv $properties $properties.old
jlahoda@77
    53
    sed -e "s/spec.version.base=.*$/spec.version.base=$NEW_VERSION.0/" <$properties.old >$properties
jlahoda@72
    54
done;
jlahoda@75
    55
jlahoda@75
    56
mv kit/nbproject/project.xml kit/nbproject/project.xml.old
jlahoda@75
    57
sed -e "s/<specification-version>.*<\/specification-version>/<specification-version>$NEW_VERSION<\/specification-version>/" <kit/nbproject/project.xml.old >kit/nbproject/project.xml