Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pub
frama-c
Commits
0d437d3f
Commit
0d437d3f
authored
May 19, 2021
by
François Bobot
Browse files
Handle version with tilde by using it with branch name and files
parent
94ed1c5e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
0d437d3f
...
...
@@ -39,6 +39,7 @@ endif
###################
VERSION
:=
$(
shell
$(CAT)
VERSION
)
VERSION_SAFE
=
$(
subst
~,-,
$(VERSION)
)
VERSION_CODENAME
:=
$(
shell
$(CAT)
VERSION_CODENAME
)
###########################
...
...
@@ -2436,9 +2437,9 @@ CLIENT ?=
DISTRIB_DIR
=
tmp
ifeq
("$(CLIENT)","")
VERSION_NAME
:=
$(VERSION)
VERSION_NAME
:=
$(VERSION
_SAFE
)
else
VERSION_NAME
:=
$(VERSION)
-
$(CLIENT)
VERSION_NAME
:=
$(VERSION
_SAFE
)
-
$(CLIENT)
endif
DISTRIB
?=
frama-c-
$(VERSION_NAME)
-
$(VERSION_CODENAME)
...
...
@@ -2493,9 +2494,9 @@ endif
$(RM)
-r
$(DISTRIB_DIR)
doc-companions
:
$(MAKE)
-C
doc/developer archives
VERSION
=
$(VERSION)
-
$(VERSION_CODENAME)
$(MV)
doc/developer/hello-
$(VERSION)
-
$(VERSION_CODENAME)
.tar.gz hello-
$(VERSION)
-
$(VERSION_CODENAME)
.tar.gz
$(ECHO)
"The documentation companion hello-
$(VERSION)
-
$(VERSION_CODENAME)
.tar.gz has been generated."
$(MAKE)
-C
doc/developer archives
VERSION
=
$(VERSION
_SAFE
)
-
$(VERSION_CODENAME)
$(MV)
doc/developer/hello-
$(VERSION
_SAFE
)
-
$(VERSION_CODENAME)
.tar.gz hello-
$(VERSION
_SAFE
)
-
$(VERSION_CODENAME)
.tar.gz
$(ECHO)
"The documentation companion hello-
$(VERSION
_SAFE
)
-
$(VERSION_CODENAME)
.tar.gz has been generated."
clean-distrib
:
dist-clean
$(PRINT_RM)
distrib
...
...
bin/build-src-distrib.sh
View file @
0d437d3f
...
...
@@ -267,7 +267,7 @@ function add_install_page {
}
function
add_event_page
{
EVENT_WEBPAGE
=
_events/framac-
$FRAMAC_VERSION
.md
EVENT_WEBPAGE
=
_events/framac-
$FRAMAC_VERSION
_SAFE
.md
EVENT_WEBPAGE_PATH
=
$WEBSITE_DIR
/
$EVENT_WEBPAGE
if
[
"
$VERSION_MINOR
"
!=
0
]
;
then
...
...
@@ -465,9 +465,9 @@ function fill_website {
function
create_website_branch
{
if
test
"
$FINAL_RELEASE
"
=
"yes"
;
then
BRANCH_NAME
=
"release/stable-
$FRAMAC_VERSION
-
$FRAMAC_VERSION_CODENAME_LOWER
"
BRANCH_NAME
=
"release/stable-
$FRAMAC_VERSION
_SAFE
-
$FRAMAC_VERSION_CODENAME_LOWER
"
else
BRANCH_NAME
=
"release/beta-
$FRAMAC_VERSION
-
$FRAMAC_VERSION_CODENAME_LOWER
"
BRANCH_NAME
=
"release/beta-
$FRAMAC_VERSION
_SAFE
-
$FRAMAC_VERSION_CODENAME_LOWER
"
fi
# Chech whether release/<release> exists on the website
git
-C
$WEBSITE_DIR
show-ref
--verify
--quiet
refs/heads/
$BRANCH_NAME
...
...
@@ -493,7 +493,7 @@ function create_website_branch {
run
"git -C
$WEBSITE_DIR
checkout master"
exit
1
esac
run
"git -C
$WEBSITE_DIR
commit -m
\"
$FRAMAC_VERSION_
AND
_CODENAME
release
\"
"
run
"git -C
$WEBSITE_DIR
commit -m
\"
$FRAMAC_VERSION_
SAFE
-
$FRAMAC_VERSION
_CODENAME
release
\"
"
}
function
commit_wiki
{
...
...
@@ -508,7 +508,7 @@ function commit_wiki {
echo
"Abort wiki update."
exit
1
esac
run
"git -C
$WIKI_DIR
commit -m
\"
$FRAMAC_VERSION_
AND
_CODENAME
release
\"
"
run
"git -C
$WIKI_DIR
commit -m
\"
$FRAMAC_VERSION_
SAFE
-
$FRAMAC_VERSION
_CODENAME
release
\"
"
}
...
...
@@ -568,10 +568,11 @@ if test \! -f VERSION ; then
fi
FRAMAC_VERSION
=
$(
cat
VERSION
)
FRAMAC_VERSION_SAFE
=
"
$(
echo
${
FRAMAC_VERSION
}
|
sed
-e
"s/~/-/"
)
"
FRAMAC_TAG
=
$(
git describe
--tag
)
FRAMAC_VERSION_CODENAME
=
$(
cat
VERSION_CODENAME
)
FRAMAC_VERSION_CODENAME_LOWER
=
$(
echo
"
$FRAMAC_VERSION_CODENAME
"
|
tr
'[:upper:]'
'[:lower:]'
)
FRAMAC_VERSION_AND_CODENAME
=
"
${
FRAMAC_VERSION
}
-
${
FRAMAC_VERSION_CODENAME
}
"
FRAMAC_VERSION_AND_CODENAME
=
"
${
FRAMAC_VERSION
_SAFE
}
-
${
FRAMAC_VERSION_CODENAME
}
"
TARGZ_FILENAME
=
frama-c-
${
FRAMAC_VERSION_AND_CODENAME
}
.tar.gz
VERSION_MODIFIER
=
$(
cat
VERSION |
sed
-e
s/[0-9.]
*
\\\(
.
*
\\\)
/
\\
1/
)
...
...
@@ -584,7 +585,7 @@ if [ "$VERSION_MODIFIER" == "+dev" ]; then
proceed_anyway
"Update VERSION and run the script again"
fi
if
test
"
$FRAMAC_VERSION
"
!=
"
$FRAMAC_TAG
"
;
then
if
test
"
$FRAMAC_VERSION
_SAFE
"
!=
"
$FRAMAC_TAG
"
;
then
echo
"### WARNING: The current commit is not tagged with the current version:"
echo
"Frama-C Version:
$FRAMAC_VERSION
"
echo
"Frama-C Tag :
$FRAMAC_TAG
"
...
...
@@ -737,7 +738,7 @@ case "${STEP}" in
run
"git worktree add -f --detach
$BUILD_DIR
$FRAMAC_BRANCH
"
run
"cd
$BUILD_DIR
; autoconf"
run
"cd
$BUILD_DIR
; ./configure"
run
"cd
$BUILD_DIR
; make -j OPEN_SOURCE=yes src-distrib"
run
"cd
$BUILD_DIR
; make -j OPEN_SOURCE=yes
DISTRIB=frama-c-
${
FRAMAC_VERSION_AND_CODENAME
}
src-distrib"
# sanity check: markdown-report must be distributed
run
"tar tf
$BUILD_DIR
/
$TARGZ_FILENAME
| grep -q src/plugins/markdown-report"
run
"cp
$BUILD_DIR
/
$TARGZ_FILENAME
$OUT_DIR
"
...
...
@@ -774,7 +775,7 @@ case "${STEP}" in
8
)
step 8
"CHECK GENERATED DISTRIBUTION"
assert_out_dir
TEST_DIR
=
"
$BUILD_DIR_ROOT
/frama-c-
$FRAMAC_VERSION
-
$FRAMAC_VERSION
_CODENAME
"
TEST_DIR
=
"
$BUILD_DIR_ROOT
/frama-c-
$
{
FRAMAC_VERSION
_AND
_CODENAME
}
"
run
"mkdir -p
$BUILD_DIR_ROOT
"
run
"rm -rf
$TEST_DIR
"
run
"cp
$OUT_DIR
/
$TARGZ_FILENAME
$BUILD_DIR_ROOT
"
...
...
doc/Makefile
View file @
0d437d3f
...
...
@@ -38,6 +38,7 @@ FRAMAC_DOCDIR ?= $(DOCDIR)/frama-c
###################
VERSION
=
$(
shell
$(SED)
-e
's/\\(.*\\
)
/\\1/'
$(FRAMAC_SRC)
/VERSION
)
VERSION_SAFE
=
$(
subst
~,-,
$(VERSION)
)
ifeq
($(findstring +dev,$(VERSION)),+dev)
DEVELOPMENT
=
yes
...
...
Write
Preview
Supports
Markdown
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