projects
/
git-tools-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
centos: update version number only if it starts with a digit
[git-tools-moved-to-github.git]
/
id-release
diff --git
a/id-release
b/id-release
index
f6875c7
..
f10cbfa
100755
(executable)
--- a/
id-release
+++ b/
id-release
@@
-25,7
+25,7
@@
echo "Did you updated the news log file?"
for file in Changes News NEWS
do
if [ -e $file ]; then
for file in Changes News NEWS
do
if [ -e $file ]; then
- ls -l Changes
+ ls -l $file
fi
done
echo ""
fi
done
echo ""
@@
-47,6
+47,9
@@
if [ `ls |egrep '\.spec$' | wc -l` -eq 0 ]; then
else
spec=`ls |egrep '\.spec$' | head -1`
package=`perl -ne 's/\s*$//; print if s/^NAME=//' IDMETA`
else
spec=`ls |egrep '\.spec$' | head -1`
package=`perl -ne 's/\s*$//; print if s/^NAME=//' IDMETA`
+ if [ -z "$package" ]; then
+ package=`basename $spec .spec`
+ fi
fi
# configure new version
fi
# configure new version
@@
-66,14
+69,16
@@
fi
perl -i.bak -npe "\$. == 1 && s,\(.*?\),($version)," debian/changelog
# update redhat version file
perl -i.bak -npe "\$. == 1 && s,\(.*?\),($version)," debian/changelog
# update redhat version file
-perl -i.bak -npe "s,^Version: .*,Version: $version," $spec
+perl -i.bak -npe "s,^Version: \d+.*,Version: $version," $spec
######################################################################
echo ""
######################################################################
echo ""
-echo "# Please run now"
+echo "# Please commit the version updates now"
echo "git commit -a"
echo "git commit -a"
+echo ""
+echo "# Please run now"
echo "git push"
echo "git tag v$version"
echo "git push origin tag v$version"
echo "git push"
echo "git tag v$version"
echo "git push origin tag v$version"