File tree Expand file tree Collapse file tree 1 file changed +65
-0
lines changed
Expand file tree Collapse file tree 1 file changed +65
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ if [ $# -lt 1 ] ; then
4+ echo " Version has to be specified"
5+ exit 1
6+ fi
7+
8+ V_TXT=" $1 "
9+
10+ cd " $( dirname " $0 " ) "
11+
12+ V_DATE_MDY=" $( date ' +%m/%d/%Y' ) "
13+ V_DATE_YMD=" $( date ' +%Y-%m-%d' ) "
14+ V_DATE_RFC=" $( date -R ) "
15+
16+ V_USER_NAME=" $( git config user.name) "
17+ V_USER_EMAIL=" $( git config user.email) "
18+
19+ sed --in-place \
20+ -e ' s#^\([\t ]*\)versionText = "Version [^"]*\\n";.*$#\1versionText = "Version ' " $V_TXT " ' \\n";#' \
21+ qtmips_gui/aboutdialog.cpp
22+
23+ if grep -q " qtmips ($V_TXT )" debian/changelog ; then
24+ sed --in-place \
25+ -e ' 1,/^ -- .*$/s/^ -- .*$/' " -- $V_USER_NAME <$V_USER_EMAIL > $V_DATE_RFC /" \
26+ debian/changelog
27+ else
28+ cat > debian/changelog.tmp << EOF
29+ qtmips ($V_TXT ) unstable; urgency=medium
30+
31+ * Debian package updated to version $V_TXT .
32+
33+ -- $V_USER_NAME <$V_USER_EMAIL > $V_DATE_RFC
34+
35+ EOF
36+ cat debian/changelog >> debian/changelog.tmp
37+ mv debian/changelog.tmp debian/changelog
38+ fi
39+
40+ sed --in-place \
41+ -e ' s#^\(Version:[\t ]*\)[^ ]\+ *$#\1' " $V_TXT " ' #' \
42+ qtmips.spec
43+
44+ nedit-nc debian/changelog
45+
46+ echo Press enter to continue
47+ read x
48+
49+ git add debian/changelog qtmips_gui/aboutdialog.cpp qtmips.spec
50+
51+ echo > .git/GITGUI_MSG " Version updated to $V_TXT "
52+
53+ git gui
54+
55+ git tag -d v$V_TXT
56+
57+ git tag -s v$V_TXT
58+
59+ rm -rf ../debian-test-build
60+
61+ mkdir -p ../debian-test-build/qtmips-$V_TXT
62+
63+ cd ../debian-test-build/qtmips-$V_TXT || exit 1
64+
65+ dpkg-buildpackage
You can’t perform that action at this time.
0 commit comments