Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
4035bf20
Commit
4035bf20
authored
Dec 05, 2015
by
Matthias Braun
Browse files
fix/improve make_release.sh
parent
6b1a3ef2
Changes
1
Hide whitespace changes
Inline
Side-by-side
support/make_release.sh
View file @
4035bf20
#!/bin/sh
set
-eu
if
!
test
-e
.git
;
then
echo
"Must be started from toplevel libfirm dir"
exit
1
fi
# Check that our git checkout is clean (remember that we use git archive
# which will miss things uncommitted changes)
if
[
"
$(
git status
--porcelain
)
"
!=
""
]
;
then
echo
"Git checkout not clean!"
exit
1
fi
WORKDIR
=
"release"
VERSION_MAJOR
=
"1"
VERSION_MINOR
=
"22"
VERSION_MICRO
=
"0"
VERSION
=
"
${
VERSION_MAJOR
}
.
${
VERSION_MINOR
}
.
${
VERSION_MICRO
}
"
RELEASEDIR
=
"libfirm-
$VERSION
"
FULLRELEASEDIR
=
"
$WORKDIR
/
$RELEASEDIR
"
RELEASEFILE
=
"libfirm-
$VERSION
.tar.bz2"
VERSIONFILE
=
"../ir/common/version.h"
RELEASEFILE
=
"build/libfirm-
$VERSION
.tar.bz2"
VERSIONFILE
=
"ir/common/version.h"
# test if versions match
echo
"Checking
for
version
mismatch
"
echo
"Checking version
in
$VERSIONFILE
"
egrep
-q
"#define libfirm_VERSION_MAJOR
\\
s*
$VERSION_MAJOR
"
$VERSIONFILE
egrep
-q
"#define libfirm_VERSION_MINOR
\\
s*
$VERSION_MINOR
"
$VERSIONFILE
egrep
-q
"#define libfirm_VERSION_MICRO
\\
s*
$VERSION_MICRO
"
$VERSIONFILE
echo
"Checking version in CMakeLists.txt"
grep
-q
"set(libfirm_VERSION
\"
${
VERSION_MAJOR
}
.
${
VERSION_MINOR
}
.
${
VERSION_MICRO
}
\"
)"
CMakeLists.txt
echo
"Checking version in NEWS.md"
grep
-q
"
$VERSION_MAJOR
.
$VERSION_MINOR
.
$VERSION_MICRO
"
NEWS.md
rm
-rf
"
$FULLRELEASEDIR
"
echo
"Creating
$RELEASEFILE
"
git archive HEAD | bzip2
>
"
$RELEASEFILE
"
git archive
--prefix
libfirm-
$VERSION
/
HEAD | bzip2
>
"
$RELEASEFILE
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment