cppcheck/createrelease

138 lines
4.3 KiB
Plaintext
Raw Normal View History

2009-02-02 20:21:58 +01:00
#!/bin/bash
#
# A script for creating release packages. The release packages are create in the home directory.
#
# Create release candidate
# ========================
#
# Windows installer:
# - ensure latest build was successful
# - ensure cfg files etc are included (win_installer/cppcheck.wxs)
2020-06-13 18:19:47 +02:00
#
# self check, fix critical issues:
# make clean && make CXXFLAGS=-O2 MATCHCOMPILER=yes -j4
# ./cppcheck -D__CPPCHECK__ --std=c++11 --library=cppcheck-lib --enable=style --inconclusive --inline-suppr --suppress=bitwiseOnBoolean --suppress=shadowFunction --suppress=useStlAlgorithm --suppress=*:externals/picojson.h --suppress=functionConst --suppress=functionStatic --xml cli gui/*.cpp lib 2> selfcheck.xml
#
# check --bug-hunting output:
2022-02-05 11:51:11 +01:00
# make clean && make -j4 USE_Z3=yes CXXFLAGS=-O2 MATCHCOMPILER=yes && ./cppcheck -D__CPPCHECK__ --bug-hunting --xml lib 2> bughunting.xml
#
2015-01-03 17:31:52 +01:00
# Update translations
# lupdate gui.pro
#
# Update copyright year
2022-02-05 11:51:11 +01:00
# git diff 2.6 -- */*.cpp */*.h | grep '^diff --git a/' | sed 's|.* b/||' | xargs sed -i 's/Copyright (C) 2007-20[12]./Copyright (C) 2007-2022/'
# git diff | grep '^diff --git a/'
#
2022-02-05 11:51:11 +01:00
# Make sure "cppcheck --errorlist" works:
# make clean && make -j4 && ./cppcheck --errorlist > errlist.xml && xmllint --noout errlist.xml
2009-08-16 15:57:16 +02:00
#
2013-06-18 06:47:15 +02:00
# Update AUTHORS using output from:
2017-10-07 12:55:36 +02:00
# git log --format='%aN' 1.81..HEAD | sort -u > AUTHORS2 && diff -y AUTHORS AUTHORS2 | less
2013-06-18 06:47:15 +02:00
#
# Create 2.6.x branch
# git checkout -b 2.6.x ; git push -u origin 2.6.x
#
# Update version numbers in:
2022-02-05 12:17:54 +01:00
# sed -i -r "s/version 2[.][0-9]+([.]99)*/2.7/" cli/main.cpp
# sed -i -r "s|2[.][0-9]+([.]99)*|2.7|" cmake/versions.cmake
# sed -i -r "s/MINOR [0-9]+/MINOR 7/" lib/version.h
# sed -i -r "s/2[.][0-9]+([.]99)*/2.7/" win_installer/productInfo.wxi
# sed -i -r "s/subtitle: Version 2\.[0-9]+/subtitle: Version 2.7/" man/*.md
# Ensure that "-rc1" is added in productInfo.wxi and lib/version.h
2013-10-12 12:44:43 +02:00
# Verify:
2016-01-09 15:37:10 +01:00
# grep '\.99' */*.[ch]* && grep '[0-9][0-9] dev' */*.[ch]*
# egrep "2\.[0-9]+" */*.h */*.cpp man/*.md | grep -v "test/test" | less
2013-10-12 12:44:43 +02:00
# git commit -a -m "1.43: Set versions"
2010-05-08 15:36:11 +02:00
#
# Build and test the windows installer
#
# Update the Makefile:
2016-01-09 15:37:10 +01:00
# make dmake && ./dmake --release
# git commit -a -m "1.43: Updated Makefile"
#
# Tag:
# git tag 2.6-rc1
# git push --tags
2010-05-08 15:36:11 +02:00
#
# Release
# =======
#
# Write release notes
#
# Remove "-rc1" from versions. Test: git grep "\-rc[0-9]"
#
# git tag 2.6 ; git push --tags
# ./createrelease 2.6
#
2019-06-29 10:21:03 +02:00
# Create a release folder on sourceforge:
# https://sourceforge.net/projects/cppcheck/files/cppcheck/
#
# copy msi from release-windows
# copy manual from build-manual
#
2014-08-02 14:05:54 +02:00
# Update download link on index.php main page
#
2015-01-03 17:31:52 +01:00
# write a news
#
# save "cppcheck --doc" output on wiki
#
2012-09-01 18:11:09 +02:00
# compile new democlient:
# ssh -t danielmarjamaki,cppcheck@shell.sourceforge.net create
# ./build-cppcheck.sh 1.43
2014-08-02 14:05:54 +02:00
#
# run daca with new release
2019-12-21 20:11:00 +01:00
# 1. edit tools/donate-cpu-server.py. Update OLD_VERSION and VERSION
2020-05-10 14:30:53 +02:00
# 2. scp tools/donate-cpu-server.py danielmarjamaki@cppcheck1.osuosl.org:/var/daca@home/
#
# self check, fix stylistic issues:
# ./cppcheck -D__CPPCHECK__ --library=cppcheck-lib --enable=style --inconclusive --inline-suppr --suppress=bitwiseOnBoolean --suppress=shadowFunction --suppress=useStlAlgorithm --suppress=*:externals/picojson.h cli gui/*.cpp lib
2021-07-04 11:20:19 +02:00
#
# Set debug version (see 803eea912c9512c810a7e78d58bb927d89a6daa1)
# Tag to use
tag=$1
2009-02-02 20:21:58 +01:00
# Name of release
releasename=cppcheck-$tag
2009-02-02 20:21:58 +01:00
2019-06-29 16:16:33 +02:00
set -e
2019-06-29 16:16:33 +02:00
cd ~/cppcheck
2016-08-06 18:58:12 +02:00
git checkout $tag
2020-06-13 18:19:47 +02:00
mkdir -p upload
2019-06-29 16:16:33 +02:00
make clean
2019-06-29 16:16:33 +02:00
# Create archives..
git archive --format=tar --prefix=$releasename/ $tag | gzip > upload/$releasename.tar.gz
git archive --format=tar --prefix=$releasename/ $tag | bzip2 > upload/$releasename.tar.bz2
git archive --format=zip -9 --prefix=$releasename/ $tag > upload/$releasename.zip
cd upload
scp $releasename.* danielmarjamaki,cppcheck@frs.sourceforge.net:/home/frs/project/c/cp/cppcheck/cppcheck/$tag/
rm $releasename.*
cd ..
# Generate version.txt
2019-06-29 16:16:33 +02:00
make -j4
./cppcheck --version > upload/version.txt
cd ~/cppcheck/upload
scp * danielmarjamaki,cppcheck@web.sourceforge.net:htdocs/
cd ~/cppcheck
rm -rf upload
2019-06-29 10:21:03 +02:00
# Local cppcheck binary
mkdir -p ~/.cppcheck/$tag
cd ~/.cppcheck/$tag
cp -R ~/cppcheck/cfg .
cp -R ~/cppcheck/addons .
cp -R ~/cppcheck/platforms .
cd ~/cppcheck
make clean ; make -j4 FILESDIR=~/.cppcheck/$tag MATCHCOMPILER=yes USE_Z3=yes
mv cppcheck ~/.cppcheck/cppcheck-$tag
git checkout main