diff options
author | Artur Signell <artur@vaadin.com> | 2014-08-19 13:30:59 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-08-19 14:02:11 +0000 |
commit | dfbc235915e47c651dcd835c01927d3b55b149fe (patch) | |
tree | 180d7ced31bfcef1449b444b62fb34d4d0dc4c88 /scripts | |
parent | bb3d7a233163a2a7dfb268198fa8a0e4b8bde3a5 (diff) | |
download | vaadin-framework-dfbc235915e47c651dcd835c01927d3b55b149fe.tar.gz vaadin-framework-dfbc235915e47c651dcd835c01927d3b55b149fe.zip |
Script for replacing all empty @since tags with a given version
Change-Id: I10cefbeb4028b6b511db5af94c287656c32a5efe
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/updateSinceTags.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/scripts/updateSinceTags.sh b/scripts/updateSinceTags.sh new file mode 100755 index 0000000000..f07ba7fb7e --- /dev/null +++ b/scripts/updateSinceTags.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +version=$1 + +if [ "$version" = "" ] +then + echo "Usage: $0 <version to set>" + exit 1 +fi + +scriptdir=`dirname $0` +basedir=$scriptdir"/.." + +sincefiles=`find $basedir -name *.java|xargs egrep -Hi "(@since$|@since $)"|grep -v "./work/"|grep -v "./uitest/"|grep -v "/tests/"|cut -d: -f 1|sort|uniq` + +# Stupid feature detection using an invalid parameter. +# Mac requires a parameter for the -i option (creates a backup file with that suffix) +# Linux does not support any parameters for -i +mac=`sed --foobaryeano 2>&1|grep -- "-i extension"` +if [ "$mac" = "" ] +then + sedCmd="sed -i" +else + sedCmd="sed -i backup" +fi +for f in $sincefiles +do + $sedCmd "s/@since\$/@since $version/g" $f + $sedCmd "s/@since \$/@since $version/g" $f +done |