2009-02-02 20:21:58 +01:00
|
|
|
#!/bin/bash
|
2010-03-10 17:20:34 +01:00
|
|
|
#
|
2011-02-06 12:52:52 +01:00
|
|
|
# A script for creating release packages. The release packages are create in the home directory.
|
2009-03-03 16:27:18 +01:00
|
|
|
#
|
2021-10-02 13:06:11 +02:00
|
|
|
# Create release candidate
|
|
|
|
# ========================
|
|
|
|
#
|
2020-06-22 12:13:03 +02:00
|
|
|
# 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
|
|
|
#
|
2020-10-03 09:32:43 +02:00
|
|
|
# self check, fix critical issues:
|
2022-02-05 11:34:13 +01:00
|
|
|
# make clean && make CXXFLAGS=-O2 MATCHCOMPILER=yes -j4
|
2023-08-14 10:29:04 +02:00
|
|
|
# ./cppcheck -D__CPPCHECK__ -D__GNUC__ -DCHECK_INTERNAL -DHAVE_RULES --std=c++11 --library=cppcheck-lib --library=qt --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
|
2020-12-04 21:36:17 +01:00
|
|
|
#
|
2015-01-03 17:31:52 +01:00
|
|
|
# Update translations
|
|
|
|
# lupdate gui.pro
|
|
|
|
#
|
2018-01-14 15:44:49 +01:00
|
|
|
# Update copyright year
|
2022-07-19 20:42:19 +02:00
|
|
|
# git diff 2.8 -- */*.cpp */*.h | grep '^diff --git a/' | sed 's|.* b/||' | xargs sed -i 's/Copyright (C) 2007-20[12]./Copyright (C) 2007-2022/'
|
2018-01-14 15:44:49 +01:00
|
|
|
# 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:
|
2022-07-19 20:42:19 +02:00
|
|
|
# git log --format='%aN' 2.7..HEAD | sort -u > AUTHORS2 && diff -y AUTHORS AUTHORS2 | less
|
2013-06-18 06:47:15 +02:00
|
|
|
#
|
2022-07-19 20:42:19 +02:00
|
|
|
# Create 2.8.x branch
|
|
|
|
# git checkout -b 2.8.x ; git push -u origin 2.8.x
|
2021-10-02 13:06:11 +02:00
|
|
|
#
|
2023-12-07 14:24:03 +01:00
|
|
|
# Release notes:
|
|
|
|
# - ensure safety critical issues are listed properly
|
|
|
|
# - empty the releasenotes.txt in main branch
|
2023-09-10 17:18:02 +02:00
|
|
|
#
|
2011-02-06 12:52:52 +01:00
|
|
|
# Update version numbers in:
|
2022-07-19 20:42:19 +02:00
|
|
|
# sed -i -r "s/version 2[.][0-9]+([.]99)*/version 2.9/" cli/main.cpp
|
2023-06-28 16:25:11 +02:00
|
|
|
# sed -i -r "s|2[.][0-9]+([.]99)*|2.9.0|" cmake/versions.cmake # version must have 3 parts.
|
2022-07-19 20:42:19 +02:00
|
|
|
# sed -i -r "s/MINOR [0-9]+/MINOR 9/" lib/version.h
|
|
|
|
# sed -i -r "s/2[.][0-9]+([.]99)*/2.9/" win_installer/productInfo.wxi
|
|
|
|
# sed -i -r "s/subtitle: Version 2\.[0-9]+/subtitle: Version 2.9/" man/*.md
|
2021-10-02 13:06:11 +02:00
|
|
|
# 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]*
|
2021-07-04 08:41:55 +02:00
|
|
|
# egrep "2\.[0-9]+" */*.h */*.cpp man/*.md | grep -v "test/test" | less
|
2022-07-19 20:42:19 +02:00
|
|
|
# git commit -a -m "2.8: Set versions"
|
2010-05-08 15:36:11 +02:00
|
|
|
#
|
2021-07-04 08:52:38 +02:00
|
|
|
# Build and test the windows installer
|
|
|
|
#
|
2010-05-08 12:55:42 +02:00
|
|
|
# Update the Makefile:
|
2016-01-09 15:37:10 +01:00
|
|
|
# make dmake && ./dmake --release
|
2023-09-01 18:36:38 +02:00
|
|
|
# Uppdatera CI så att dmake körs med --release
|
2022-07-19 20:42:19 +02:00
|
|
|
# git commit -a -m "2.8: Updated Makefile"
|
2011-02-06 12:52:52 +01:00
|
|
|
#
|
2023-09-09 15:12:32 +02:00
|
|
|
# Ensure that CI is happy
|
|
|
|
#
|
2011-02-06 12:52:52 +01:00
|
|
|
# Tag:
|
2022-07-19 20:42:19 +02:00
|
|
|
# git tag 2.8-rc1
|
2011-02-06 12:52:52 +01:00
|
|
|
# git push --tags
|
2010-05-08 15:36:11 +02:00
|
|
|
#
|
2021-10-02 13:06:11 +02:00
|
|
|
# Release
|
|
|
|
# =======
|
|
|
|
#
|
|
|
|
# Remove "-rc1" from versions. Test: git grep "\-rc[0-9]"
|
|
|
|
#
|
2019-06-29 10:21:03 +02:00
|
|
|
# Create a release folder on sourceforge:
|
|
|
|
# https://sourceforge.net/projects/cppcheck/files/cppcheck/
|
|
|
|
#
|
2022-08-28 17:21:32 +02:00
|
|
|
# git tag 2.8 ; git push --tags
|
|
|
|
# ./createrelease 2.8
|
|
|
|
#
|
2021-10-02 15:19:59 +02:00
|
|
|
# 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
|
|
|
|
#
|
2023-09-10 17:18:02 +02:00
|
|
|
# Write Changelog
|
|
|
|
# git log 2.11..2.12 > Changelog
|
|
|
|
# <edit>
|
|
|
|
#
|
|
|
|
# Trac:
|
|
|
|
# 1. Create ticket "2.12 safety cosmetic changes"
|
|
|
|
# 2. Check priorities for all tickets in milestone. Should be: safety-*
|
|
|
|
# 3. Create new milestone
|
|
|
|
# 4. Close old milestone
|
|
|
|
#
|
2015-01-03 17:31:52 +01:00
|
|
|
# write a news
|
|
|
|
#
|
2021-10-02 13:06:11 +02:00
|
|
|
# save "cppcheck --doc" output on wiki
|
2011-10-08 10:16:38 +02:00
|
|
|
#
|
2012-09-01 18:11:09 +02:00
|
|
|
# compile new democlient:
|
2016-08-07 16:52:40 +02:00
|
|
|
# ssh -t danielmarjamaki,cppcheck@shell.sourceforge.net create
|
2023-09-10 17:18:02 +02:00
|
|
|
# ./build-cppcheck.sh
|
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
|
2022-08-28 17:21:32 +02:00
|
|
|
# 2. scp -i ../.ssh/osuosl_id_rsa tools/donate-cpu-server.py danielmarjamaki@cppcheck1.osuosl.org:/var/daca@home/
|
2020-10-03 09:32:43 +02:00
|
|
|
#
|
2023-09-10 17:18:02 +02:00
|
|
|
# Backup:
|
|
|
|
# * trac: cd /var && nice tar -zcf /home/danielmarjamaki/trac.tar.gz trac-cppcheck
|
|
|
|
# * git: git checkout -f && git checkout main && git pull && tar -zcf ~/cppchecksolutions/backups/2.12.0-git.tar.gz .git
|
|
|
|
# * Changelog
|
2009-03-03 16:27:18 +01:00
|
|
|
|
2023-09-10 12:26:35 +02:00
|
|
|
# Folder/tag to use
|
|
|
|
folder=$1
|
|
|
|
tag=$folder.0
|
2009-02-02 20:21:58 +01:00
|
|
|
|
2009-03-07 13:21:02 +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
|
2010-03-09 10:41:36 +01:00
|
|
|
|
2019-06-29 16:16:33 +02:00
|
|
|
cd ~/cppcheck
|
2016-08-06 18:58:12 +02:00
|
|
|
|
2021-07-04 10:50:18 +02:00
|
|
|
git checkout $tag
|
|
|
|
|
2023-09-10 12:26:35 +02:00
|
|
|
rm -rf upload
|
2020-06-13 18:19:47 +02:00
|
|
|
mkdir -p upload
|
2019-06-29 16:16:33 +02:00
|
|
|
|
2020-05-10 14:14:50 +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
|
2023-09-10 12:26:35 +02:00
|
|
|
scp $releasename.* danielmarjamaki,cppcheck@frs.sourceforge.net:/home/frs/project/c/cp/cppcheck/cppcheck/$folder/
|
2019-06-29 16:16:33 +02:00
|
|
|
rm $releasename.*
|
|
|
|
cd ..
|
|
|
|
|
2021-03-21 21:35:15 +01:00
|
|
|
# Generate version.txt
|
2019-06-29 16:16:33 +02:00
|
|
|
make -j4
|
2023-09-10 12:26:35 +02:00
|
|
|
rm cppcheck.cfg
|
2019-06-29 16:16:33 +02:00
|
|
|
./cppcheck --version > upload/version.txt
|
|
|
|
|
|
|
|
cd ~/cppcheck/upload
|
2023-09-10 12:26:35 +02:00
|
|
|
scp version.txt danielmarjamaki,cppcheck@web.sourceforge.net:htdocs/
|
2019-06-29 16:16:33 +02:00
|
|
|
|
|
|
|
cd ~/cppcheck
|
|
|
|
rm -rf upload
|
2019-06-29 10:21:03 +02:00
|
|
|
|
2021-07-04 10:50:18 +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
|
2022-04-11 07:30:55 +02:00
|
|
|
make clean ; make -j4 FILESDIR=~/.cppcheck/$tag MATCHCOMPILER=yes
|
2021-07-04 10:50:18 +02:00
|
|
|
mv cppcheck ~/.cppcheck/cppcheck-$tag
|
|
|
|
|
|
|
|
git checkout main
|