Skip to content

Commit 70af358

Browse files
authored
createrelease: tweaks [skip ci] (#8635)
1 parent 2285c1d commit 70af358

1 file changed

Lines changed: 52 additions & 41 deletions

File tree

createrelease

Lines changed: 52 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
11
#!/bin/bash
22
#
3-
# A script for creating release packages. The release packages are create in the home directory.
3+
# A script for creating release packages. The release packages are created in the home directory.
44
#
55
# Create release candidate
66
# ========================
77
#
88
# Review trac roadmap, are tickets closed properly?
99
# Only tickets that should be retargeted should be open.
1010
#
11-
# update cppcheck used in premium addon CI
12-
# create jira issue "CI: update cppcheck binary"
13-
# cd ~/cppchecksolutions/addon/tools && python3 ci-update-cppcheck.py
11+
# Versioning scheme
12+
# ========================
13+
# VERSION=2.22.0 # the new release tag created
14+
# PREV=2.21.0 # the previous release
15+
# BRANCH=2.22.x # release branch
16+
#
17+
# 2.22.x BRANCH - release branch
18+
# 2.22.0 TAG - the release
19+
# 2.22.1, ... TAG - patch releases
20+
# 2.22.0-rc1 TAG - release candidate
1421
#
15-
# update mappings..
22+
# Update mappings:
1623
# cd ~/cppchecksolutions/addon/coverage
1724
# CPPCHECK_REPO=~/cppchecksolutions/cppcheck python3 coverage.py --code
1825
#
19-
# check every isPremiumEnabled call: TODO write helper script
26+
# Check every isPremiumEnabled call: TODO write helper script
2027
# - every id should be in --errorlist
2128
# git grep 'isPremiumEnabled[(]"' | sed 's/.*isPremiumEnabled[(]"//' | sed 's/".*//' | sort | uniq > ids1.txt
2229
# ./cppcheck --errorlist | grep ' id="' | sed 's/.* id="//' | sed 's/".*//' | sort | uniq > ids2.txt
@@ -29,108 +36,112 @@
2936
# - ensure latest build was successful
3037
# - ensure cfg files etc are included (win_installer/cppcheck.wxs)
3138
#
32-
# self check, fix critical issues:
39+
# Self check, fix critical issues:
3340
# make clean && make CXXOPTS=-O2 MATCHCOMPILER=yes -j4
3441
# ./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 --suppress=normalCheckLevelMaxBranches --xml cli gui/*.cpp lib 2> selfcheck.xml
3542
#
36-
# Generate lib/checkers.cpp (TODO the premium checkers should not be statically coded)
43+
# Generate lib/checkers.cpp: (TODO the premium checkers should not be statically coded)
3744
# cd ~/cppchecksolutions/cppcheck && python3 tools/get_checkers.py > lib/checkers.cpp
3845
#
39-
# Update copyright year TODO release script
40-
# 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/'
46+
# Update copyright year: TODO release script
47+
# git diff $PREV -- */*.cpp */*.h | grep '^diff --git a/' | sed 's|.* b/||' | xargs sed -i "s/Copyright (C) 2007-20[12]./Copyright (C) 2007-$(date +%Y)/"
4148
# git diff | grep '^diff --git a/'
4249
#
4350
# Make sure "cppcheck --errorlist" works:
4451
# make clean && make -j4 && ./cppcheck --errorlist > errlist.xml && xmllint --noout errlist.xml
4552
#
4653
# Update AUTHORS using output from:
47-
# git log --format='%aN' 2.7..HEAD | sort -u > AUTHORS2 && diff -y AUTHORS AUTHORS2 | less
54+
# git log --format='%aN' $PREV..HEAD | sort -u > AUTHORS2 && diff -y AUTHORS AUTHORS2 | less
55+
# Include github usernames in PR title and commit message
4856
#
49-
# Update GUI translations
50-
# lupdate gui.pro
57+
# Update GUI translations:
58+
# cd ~/cppchecksolutions/cppcheck/gui && lupdate gui.pro
5159
#
52-
# Create 2.18.x branch
53-
# git checkout -b 2.18.x ; git push -u origin 2.18.x
60+
# Create new release branch:
61+
# git checkout -b $BRANCH && git push -u origin $BRANCH
5462
# in fork:
55-
# * add upstream: git remote add upstream git@github.com:/cppcheck-opensource//cppcheck.git
56-
# * add branch: git fetch upstream 2.19.x
63+
# * add upstream: git remote add upstream git@github.com:cppcheck-opensource/cppcheck.git
64+
# * add branch: git fetch upstream $BRANCH
5765
#
5866
# Release notes:
5967
# - ensure safety critical issues are listed properly
6068
# - empty the releasenotes.txt in main branch
6169
#
6270
# Update version numbers in:
63-
# python3 tools/release-set-version.py 2.19.0
71+
# python3 tools/release-set-version.py $VERSION
6472
# Verify:
6573
# grep '\.99' */*.[ch]* && grep '[0-9][0-9] dev' */*.[ch]*
6674
# egrep "2\.[0-9]+" */*.h */*.cpp man/*.md | grep -v "test/test" | less
67-
# git commit -a -m "2.8: Set versions"
75+
# git commit -a -m "$VERSION: Set versions"
6876
#
6977
# Build and test the windows installer
7078
#
7179
# Update the Makefile:
7280
# make dmake && ./dmake --release
73-
# git commit -a -m "2.8: Updated Makefile"
81+
# git commit -a -m "$VERSION: Updated Makefile"
82+
#
83+
# Push changes:
84+
# git push
7485
#
7586
# Ensure that CI is happy
7687
#
7788
# Tag:
78-
# git tag 2.8-rc1
89+
# git tag $VERSION-rc1
7990
# git push --tags
8091
#
8192
# Release
82-
# =======
93+
# ========================
8394
#
8495
# Remove "-rc1" from versions. Test: git grep "\-rc[0-9]"
8596
#
8697
# Create a release folder on sourceforge:
8798
# https://sourceforge.net/projects/cppcheck/files/cppcheck/
8899
#
89-
# git tag 2.8 ; git push --tags
90-
# ./createrelease 2.8
100+
# git tag $VERSION && git push --tags
101+
# ./createrelease $VERSION
91102
#
92-
# copy msi from release-windows, install and test cppcheck
93-
# copy manual from build-manual
103+
# Copy msi from release-windows, install and test cppcheck
104+
# Copy manual from build-manual
94105
#
95106
# Update download link on index.php main page
96107
#
97108
# Trac:
98-
# 1. Create ticket "2.18 safety cosmetic changes"
99-
# git log --format=oneline 2.17.0..HEAD | egrep -v "^[0-9a-f]*[ ][ ]*([Ff]ix|fixed|Fixup|Fixes|refs)?[ ]*#*[0-9]+"
109+
# 1. Create ticket "$VERSION safety cosmetic changes"
110+
# git log --format=oneline $PREV..HEAD | egrep -v "^[0-9a-f]*[ ][ ]*([Ff]ix|fixed|Fixup|Fixes|refs)?[ ]*#*[0-9]+"
100111
# 2. Check priorities for all tickets in milestone. Should be: safety-*
101112
# 3. Create new milestone
102113
# 4. Close old milestone
103114
#
104-
# write a news
115+
# Write a news
105116
#
106-
# save "cppcheck --doc" output on wiki
117+
# Save "cppcheck --doc" output on wiki
107118
#
108-
# compile new democlient:
119+
# Compile new democlient:
109120
# ssh -t danielmarjamaki,cppcheck@shell.sourceforge.net create
110121
# ./build-cppcheck.sh
111122
#
112-
# create a ticket with data from http://cppcheck1.osuosl.org:8000/time_gt.html for performance tracking
123+
# Create a ticket with data from http://cppcheck1.osuosl.org:8000/time_gt.html for performance tracking
113124
# (example: https://trac.cppcheck.net/ticket/13715)
114125
# - type: defect
115126
# - component: Performance
116-
# - summary: [meta] performance regressions in 2.x
127+
# - summary: [meta] performance regressions in $VERSION
117128
#
118-
# run daca with new release
129+
# Run daca with new release:
119130
# 1. edit tools/donate-cpu-server.py. Update OLD_VERSION and SERVER_VERSION
120131
# 2. scp -i ~/.ssh/osuosl_id_rsa tools/donate-cpu-server.py danielmarjamaki@cppcheck1.osuosl.org:/var/daca@home/
121132
#
122133
# Backup:
123134
# * trac: cd /var && nice tar -cJf ~/trac.tar.xz trac-cppcheck/db/trac.db
124135
# * daca: cd /var && nice tar -cJf ~/daca.tar.xz daca@home
125136
# * git: git checkout -f && git checkout main && git pull && tar -cJf git.tar.xz .git
126-
# * git log 2.16.0..2.17.0 > Changelog
127-
# * mkdir out && python3 ~/cppchecksolutions/release/getWorkflowAndIssueLogs.py -r /cppcheck-opensource//cppcheck -t 2.15.0 -p out
137+
# * git log $PREV..$VERSION > Changelog
138+
# * mkdir out && python3 ~/cppchecksolutions/release/getWorkflowAndIssueLogs.py -r /cppcheck-opensource//cppcheck -t $VERSION -p out
128139

129-
# Folder/tag to use
130-
folder=$1
131-
tag=$folder.0
140+
# Folder/tag to use:
141+
tag=$1
142+
folder=${tag%.*}
132143

133-
# Name of release
144+
# Name of release:
134145
releasename=cppcheck-$tag
135146

136147
set -e
@@ -162,7 +173,7 @@ scp htdocs/* danielmarjamaki,cppcheck@web.sourceforge.net:htdocs/
162173
cd ..
163174
rm -rf upload
164175

165-
# Local cppcheck binary
176+
# Local cppcheck binary:
166177
mkdir -p ~/.cppcheck/$tag
167178
cd ~/.cppcheck/$tag
168179
cp -R ~/cppcheck/cfg .

0 commit comments

Comments
 (0)