Fixed #1489 (Makefile creates debug version)

This commit is contained in:
Daniel Marjamäki 2010-03-10 17:20:34 +01:00
parent 587081cab5
commit 4981cc5843
1 changed files with 26 additions and 11 deletions

View File

@ -1,13 +1,19 @@
#!/bin/bash #!/bin/bash
# A script for creating source archives from a GIT tag # A script for tagging and releasing.
#
# A tag will be created with the given name.
# #
# Archive files are created in user's home directory. # Archive files are created in user's home directory.
# #
# Remember to update version number in: # Before running this script, remember to update version number in:
# - lib/cppcheck.cpp # - lib/cppcheck.cpp
# - cli/main.cpp # - cli/main.cpp
# - cli/cppcheck.rc # - cli/cppcheck.rc
# - man/manual.docbook
# - win_installer/productInfo.wxs # - win_installer/productInfo.wxs
#
# This script will not push any changes.
#
# Tag to use # Tag to use
tag=$1 tag=$1
@ -15,24 +21,33 @@ tag=$1
# Name of release # Name of release
releasename=cppcheck-$tag releasename=cppcheck-$tag
# wget http://josefsson.org/git2cl/git2cl # Update Changelog..
echo Update Changelog.. wget http://josefsson.org/git2cl/git2cl
chmod 744 git2cl
./git2cl > Changelog ./git2cl > Changelog
git commit -a -m "Changelog: Updated for release"
echo Update Makefile.. # Update Makefile..
git tag -d $tag
g++ -o dmake tools/dmake.cpp lib/filelister.cpp g++ -o dmake tools/dmake.cpp lib/filelister.cpp
./dmake --release ./dmake --release
git commit -a -m "Makefile: Set release mode" git commit -a -m "Makefile: Set release mode"
# Tagging..
git tag $tag git tag $tag
echo Create archives.. # Create archives..
git archive --format=tar --prefix=$releasename/ $tag | gzip > ~/$releasename.tar.gz git archive --format=tar --prefix=$releasename/ $tag | gzip > ~/$releasename.tar.gz
git archive --format=tar --prefix=$releasename/ $tag | bzip2 > ~/$releasename.tar.bz2 git archive --format=tar --prefix=$releasename/ $tag | bzip2 > ~/$releasename.tar.bz2
git archive --format=zip -9 --prefix=$releasename/ $tag > ~/$releasename.zip git archive --format=zip -9 --prefix=$releasename/ $tag > ~/$releasename.zip
echo Restoring repository.. # Restore Makefile..
git tag -d $tag ./dmake
git reset --hard HEAD^1 git commit -a -m "Makefile: Set debug mode"
git pull
# Generate the manual.pdf and version.txt
make
./cppcheck --version > version.txt
docbook2pdf man/manual.pdf
# Upload manual.pdf and version.txt...
# sftp hyd_danmar,cppcheck@web.sourceforge.net