forked from danmar/cppcheck
-
Notifications
You must be signed in to change notification settings - Fork 0
/
createrelease
executable file
·137 lines (124 loc) · 4.11 KB
/
createrelease
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
#!/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)
#
# self check, fix critical 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 --suppress=functionConst --suppress=functionStatic -q lib
#
# check --bug-hunting output:
# make clean && make -j4 USE_Z3=yes && ./cppcheck -D__CPPCHECK__ --bug-hunting lib
#
# Update translations
# lupdate gui.pro
#
# Update copyright year
# git diff 2.3 -- */*.cpp */*.h | grep '^diff --git a/' | sed 's|.* b/||' | xargs sed -i 's/Copyright (C) 2007-20[12]./Copyright (C) 2007-2021/'
# git diff | grep '^diff --git a/'
#
# Make sure "cppcheck --errorlist" works. For example with:
# make test
# ./cppcheck --errorlist > errlist.xml && xmllint --noout errlist.xml
#
# Update AUTHORS using output from:
# git log --format='%aN' 1.81..HEAD | sort -u > AUTHORS2 && diff -y AUTHORS AUTHORS2 | less
#
# Create 2.6.x branch
# git checkout -b 2.6.x ; git push -u origin 2.6.x
#
# Update version numbers in:
# sed -i "s/2.[0-9][0-9]*.99/2.5/" cli/main.cpp
# sed -i "s/2.[0-9][0-9]*/2.5/" cmake/versions.cmake
# sed -i "s/MINOR [0-9]+/MINOR 5/" lib/version.h
# sed -i "s/2\.[0-9]+/2.5/" win_installer/productInfo.wxi
# sed -i "s/subtitle: Version 2\.[0-9]+/subtitle: Version 2.5/" man/*.md
# Ensure that "-rc1" is added in productInfo.wxi and lib/version.h
# 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 "1.43: Set versions"
#
# Build and test the windows installer
#
# Update the Makefile:
# make dmake && ./dmake --release
# git commit -a -m "1.43: Updated Makefile"
#
# Tag:
# git tag 2.6-rc1
# git push --tags
#
# Release
# =======
#
# Write release notes
#
# Remove "-rc1" from versions. Test: git grep "\-rc[0-9]"
#
# git tag 2.6 ; git push --tags
# ./createrelease 2.6
#
# Create a release folder on sourceforge:
# https://sourceforge.net/projects/cppcheck/files/cppcheck/
#
# copy msi from release-windows
# copy manual from build-manual
#
# Update download link on index.php main page
#
# write a news
#
# save "cppcheck --doc" output on wiki
#
# compile new democlient:
# ssh -t danielmarjamaki,[email protected] create
# ./build-cppcheck.sh 1.43
#
# run daca with new release
# 1. edit tools/donate-cpu-server.py. Update OLD_VERSION and VERSION
# 2. scp tools/donate-cpu-server.py [email protected]:/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
#
# Set debug version (see 803eea912c9512c810a7e78d58bb927d89a6daa1)
# Tag to use
tag=$1
# Name of release
releasename=cppcheck-$tag
set -e
cd ~/cppcheck
git checkout $tag
mkdir -p upload
make clean
# 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,[email protected]:/home/frs/project/c/cp/cppcheck/cppcheck/$tag/
rm $releasename.*
cd ..
# Generate version.txt
make -j4
./cppcheck --version > upload/version.txt
cd ~/cppcheck/upload
scp * danielmarjamaki,[email protected]:htdocs/
cd ~/cppcheck
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 -j4 FILESDIR=~/.cppcheck/$tag MATCHCOMPILER=yes USE_Z3=yes
mv cppcheck ~/.cppcheck/cppcheck-$tag
git checkout main