Set ARCHS to i386 and amd64. Allow override in IDMETA
[git-tools-moved-to-github.git] / id-release
index f6875c7..5345e19 100755 (executable)
@@ -25,7 +25,7 @@ echo "Did you updated the news log file?"
 for file in Changes News NEWS
 do
   if [ -e $file ]; then
-    ls -l Changes
+    ls -l $file
   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`
+    if [ -z "$package" ]; then
+       package=`basename $spec .spec`
+    fi
 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 "s,^Version: .*,Version: $version," $spec
+perl -i.bak -npe "s,^Version: \d+.*,Version: $version," $spec
 
 
 
 ######################################################################
 echo ""
-echo "# Please run now"
+echo "# Please commit the version updates now"
 echo "git commit -a"
+echo ""
+echo "# Please run now"
 echo "git push"
 echo "git tag v$version"
 echo "git push origin tag v$version"
@@ -85,7 +90,7 @@ fi
 ######################################################################
 echo ""
 echo "# On RedHat or centos, please run the commands"
-echo "sudo date"
+echo "sudo date # ask for password early"
 echo "git pull"
 echo "\$HOME/proj/git-tools/id-deb-build/mkdist.sh"
 echo "sudo cp $package-$version.tar.gz /usr/src/redhat/SOURCES/"