forked from danmar/cppcheck
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreaterelease
More file actions
executable file
·175 lines (164 loc) · 5.93 KB
/
createrelease
File metadata and controls
executable file
·175 lines (164 loc) · 5.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
#!/bin/bash
#
# A script for creating release packages. The release packages are create in the home directory.
#
# Create release candidate
# ========================
#
# Review trac roadmap, are tickets closed properly?
# Only tickets that should be retargeted should be open.
#
# update cppcheck used in premium addon CI
# create jira issue "CI: update cppcheck binary"
# cd ~/cppchecksolutions/addon/tools && python3 ci-update-cppcheck.py
#
# update mappings..
# cd ~/cppchecksolutions/addon/coverage
# CPPCHECK_REPO=~/cppchecksolutions/cppcheck python3 coverage.py --code
#
# check every isPremiumEnabled call: TODO write helper script
# - every id should be in --errorlist
# git grep 'isPremiumEnabled[(]"' | sed 's/.*isPremiumEnabled[(]"//' | sed 's/".*//' | sort | uniq > ids1.txt
# ./cppcheck --errorlist | grep ' id="' | sed 's/.* id="//' | sed 's/".*//' | sort | uniq > ids2.txt
# diff -y ids1.txt ids2.txt
# - premiumaddon: check coverage.py
# python3 coverage.py --id ; sort ids-*.txt | uniq > ~/cppcheck/ids3.txt
# diff -y ids2.txt ids3.txt
#
# Windows installer:
# - ensure latest build was successful
# - ensure cfg files etc are included (win_installer/cppcheck.wxs)
#
# self check, fix critical issues:
# make clean && make CXXOPTS=-O2 MATCHCOMPILER=yes -j4
# ./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
#
# Generate lib/checkers.cpp (TODO the premium checkers should not be statically coded)
# cd ~/cppchecksolutions/cppcheck && python3 tools/get_checkers.py > lib/checkers.cpp
#
# Update copyright year TODO release script
# 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/'
# git diff | grep '^diff --git a/'
#
# Make sure "cppcheck --errorlist" works:
# make clean && make -j4 && ./cppcheck --errorlist > errlist.xml && xmllint --noout errlist.xml
#
# Update AUTHORS using output from:
# git log --format='%aN' 2.7..HEAD | sort -u > AUTHORS2 && diff -y AUTHORS AUTHORS2 | less
#
# Update GUI translations
# lupdate gui.pro
#
# Create 2.18.x branch
# git checkout -b 2.18.x ; git push -u origin 2.18.x
# in fork:
# * add upstream: git remote add upstream git@github.com:danmar/cppcheck.git
# * add branch: git fetch upstream 2.19.x
#
# Release notes:
# - ensure safety critical issues are listed properly
# - empty the releasenotes.txt in main branch
#
# Update version numbers in:
# python3 tools/release-set-version.py 2.19.0
# Verify:
# grep '\.99' */*.[ch]* && grep '[0-9][0-9] dev' */*.[ch]*
# egrep "2\.[0-9]+" */*.h */*.cpp man/*.md | grep -v "test/test" | less
# git commit -a -m "2.8: Set versions"
#
# Build and test the windows installer
#
# Update the Makefile:
# make dmake && ./dmake --release
# git commit -a -m "2.8: Updated Makefile"
#
# Ensure that CI is happy
#
# Tag:
# git tag 2.8-rc1
# git push --tags
#
# Release
# =======
#
# Remove "-rc1" from versions. Test: git grep "\-rc[0-9]"
#
# Create a release folder on sourceforge:
# https://sourceforge.net/projects/cppcheck/files/cppcheck/
#
# git tag 2.8 ; git push --tags
# ./createrelease 2.8
#
# copy msi from release-windows, install and test cppcheck
# copy manual from build-manual
#
# Update download link on index.php main page
#
# Trac:
# 1. Create ticket "2.18 safety cosmetic changes"
# git log --format=oneline 2.17.0..HEAD | egrep -v "^[0-9a-f]*[ ][ ]*([Ff]ix|fixed|Fixup|Fixes|refs)?[ ]*#*[0-9]+"
# 2. Check priorities for all tickets in milestone. Should be: safety-*
# 3. Create new milestone
# 4. Close old milestone
#
# write a news
#
# save "cppcheck --doc" output on wiki
#
# compile new democlient:
# ssh -t danielmarjamaki,cppcheck@shell.sourceforge.net create
# ./build-cppcheck.sh
#
# create a ticket with data from http://cppcheck1.osuosl.org:8000/time_gt.html for performance tracking
# (example: https://trac.cppcheck.net/ticket/13715)
# - type: defect
# - component: Performance
# - summary: [meta] performance regressions in 2.x
#
# run daca with new release
# 1. edit tools/donate-cpu-server.py. Update OLD_VERSION and SERVER_VERSION
# 2. scp -i ~/.ssh/osuosl_id_rsa tools/donate-cpu-server.py danielmarjamaki@cppcheck1.osuosl.org:/var/daca@home/
#
# Backup:
# * trac: cd /var && nice tar -cJf ~/trac.tar.xz trac-cppcheck/db/trac.db
# * daca: cd /var && nice tar -cJf ~/daca.tar.xz daca@home
# * git: git checkout -f && git checkout main && git pull && tar -cJf git.tar.xz .git
# * git log 2.16.0..2.17.0 > Changelog
# * mkdir out && python3 ~/cppchecksolutions/release/getWorkflowAndIssueLogs.py -r danmar/cppcheck -t 2.15.0 -p out
# Folder/tag to use
folder=$1
tag=$folder.0
# Name of release
releasename=cppcheck-$tag
set -e
cd ~/cppcheck
git checkout $tag
rm -rf upload
mkdir -p upload/htdocs upload/frs
# htdocs
make clean
make -j12
rm -f cppcheck.cfg
./cppcheck --version > upload/htdocs/version.txt
# TODO manual, update version on webpage
# frs
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
cp releasenotes.txt upload/frs/README.md
# TODO msi
cd upload
scp frs/* danielmarjamaki,cppcheck@frs.sourceforge.net:/home/frs/project/c/cp/cppcheck/cppcheck/$folder/
scp htdocs/* danielmarjamaki,cppcheck@web.sourceforge.net:htdocs/
cd ..
rm -rf upload
# 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 -j12 FILESDIR=~/.cppcheck/$tag MATCHCOMPILER=yes CXXOPTS=-O2
mv cppcheck ~/.cppcheck/cppcheck-$tag
git checkout main