Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
dd3fe929
Commit
dd3fe929
authored
2 years ago
by
Allan Blanchard
Browse files
Options
Downloads
Patches
Plain Diff
[release] use API to generate the release
parent
5d648209
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+16
-1
16 additions, 1 deletion
.gitlab-ci.yml
dev/build-release.sh
+41
-8
41 additions, 8 deletions
dev/build-release.sh
nix/frama-c-public/publish-release.sh
+41
-0
41 additions, 0 deletions
nix/frama-c-public/publish-release.sh
with
98 additions
and
9 deletions
.gitlab-ci.yml
+
16
−
1
View file @
dd3fe929
...
...
@@ -265,6 +265,7 @@ release-content:
-
website
-
wiki
-
opam-repository
-
release-data.json
only
:
variables
:
-
$RELEASE == "yes"
...
...
@@ -400,7 +401,7 @@ src-distrib-tests-long:
-
echo "$FRAMA_CI_BOT_SSH_PRIVATE" | nix run -f channel:nixos-19.03 coreutils --command base64 -d > nix/frama-c-public/id_ed25519
-
nix run -f channel:nixos-19.03 coreutils --command chmod 400 nix/frama-c-public/id_ed25519
release-
f
ra
ma-c
:
release-
b
ra
nch
:
stage
:
release
<<
:
*prepare_ssh_template
script
:
...
...
@@ -412,6 +413,20 @@ release-frama-c:
when
:
manual
interruptible
:
false
release-create
:
stage
:
release
script
:
-
(! git merge-base --is-ancestor a1e186c68a6418a53b3dc06237f49e8dcbf75f4a origin/$CI_COMMIT_BRANCH)
-
nix-shell -p curl --run './nix/frama-c-public/publish-release.sh'
needs
:
-
release-branch
-
release-content
only
:
variables
:
-
$RELEASE == "yes"
when
:
manual
interruptible
:
false
release-opam
:
stage
:
release
<<
:
*prepare_ssh_template
...
...
This diff is collapsed.
Click to expand it.
dev/build-release.sh
+
41
−
8
View file @
dd3fe929
...
...
@@ -38,6 +38,7 @@
# - wiki (for the public Frama-C instance)
# - website
# - opam-repository
# - release-data.json
# with the correct tree for generated files.
##########################################################################
...
...
@@ -89,6 +90,13 @@ CODENAME="$(cat VERSION_CODENAME)"
LOWER_CODENAME
=
"
$(
echo
"
$CODENAME
"
|
tr
'[:upper:]'
'[:lower:]'
)
"
VERSION_AND_CODENAME
=
"
${
VERSION_SAFE
}
-
${
CODENAME
}
"
if
[
"
$VERSION_MINOR
"
!=
0
]
;
then
PREVIOUS
=
"
$VERSION_MAJOR
.
$((
$VERSION_MINOR
-
1
))
"
else
PREVIOUS
=
"
$((
$VERSION_MAJOR
-
1
))
.0"
fi
PREVIOUS_NAME
=
$(
git show
$PREVIOUS
:VERSION_CODENAME
)
if
[
"
$VERSION_MODIFIER
"
==
"+dev"
]
;
then
echo
"Development version (
$VERSION
)"
echo_red
"Aborting"
...
...
@@ -259,7 +267,7 @@ echo "Opam file built"
##########################################################################
# Make wiki
show_step
"Building w
ebsite
"
show_step
"Building w
iki
"
WIKI_DIR
=
"wiki"
...
...
@@ -295,6 +303,38 @@ sed 's/\(\#.*\)/##\1/' $CHANGES >> $WIKI_PAGE
echo
"Wiki page built"
##########################################################################
# Make wiki
show_step
"Building release json file"
JSON_DATA
=
"release-data.json"
cat
>
$JSON_DATA
<<
EOL
{
"name": "Frama-C
$VERSION
$CODENAME
",
"tag_name": "
$VERSION_SAFE
",
"ref": "stable/
$LOWER_CODENAME
",
"assets": {
"links": [
{
"name": "API Documentation",
"url": "https://frama-c.com/download/frama-c-
$VERSION_AND_CODENAME
-api.tar.gz",
"link_type":"other"
},
{
"name": "Official source archive",
"url": "https://frama-c.com/download/
$TARGZ_VERSION
",
"link_type":"other"
}
]
},
EOL
echo
"
\"
description
\"
:
\"
# Main changes since
$PREVIOUS
$PREVIOUS_NAME
\n
$(
cat
$CHANGES
|
sed
-z
's/\n/\\n/g'
|
sed
's/\(\#.*\)/#\1/'
)
\"
"
>>
$JSON_DATA
echo
"}"
>>
$JSON_DATA
echo
"Release data file built"
##########################################################################
# Make website
...
...
@@ -344,13 +384,6 @@ echo "Installation file built"
mkdir
-p
$WEBSITE_EVENTS_DIR
if
[
"
$VERSION_MINOR
"
!=
0
]
;
then
PREVIOUS
=
"
$VERSION_MAJOR
.
$((
$VERSION_MINOR
-
1
))
"
else
PREVIOUS
=
"
$((
$VERSION_MAJOR
-
1
))
.0"
fi
PREVIOUS_NAME
=
$(
git show
$PREVIOUS
:VERSION_CODENAME
)
TEXTUAL_VERSION
=
"Frama-C
$VERSION
(
$CODENAME
)"
TEXTUAL_PREVIOUS
=
"Frama-C
$PREVIOUS
(
$PREVIOUS_NAME
)"
...
...
This diff is collapsed.
Click to expand it.
nix/frama-c-public/publish-release.sh
0 → 100755
+
41
−
0
View file @
dd3fe929
#! /usr/bin/env bash
##########################################################################
# #
# This file is part of Frama-C. #
# #
# Copyright (C) 2007-2022 #
# CEA (Commissariat à l'énergie atomique et aux énergies #
# alternatives) #
# #
# you can redistribute it and/or modify it under the terms of the GNU #
# Lesser General Public License as published by the Free Software #
# Foundation, version 2.1. #
# #
# It is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU Lesser General Public License for more details. #
# #
# See the GNU Lesser General Public License version 2.1 #
# for more details (enclosed in the file licenses/LGPLv2.1). #
# #
##########################################################################
# Note:
#
# While this script can be run locally, it is meant to run in the Frama-C CI.
# Thus, it expects to be run from the root of the Frama-C directory and that
# some CI artifacts are available. Namely:
# - 'release-data.json' as generated by the script Frama-C/dev/build-release.sh
# - the 'FRAMA_CI_BOT_RELEASE_TOKEN' variable
# - the stable branch must be available on 'pub/frama-c'
# Availability of the file is NOT checked when the script starts.
##########################################################################
curl
\
--header
'Content-Type: application/json'
\
--header
"PRIVATE-TOKEN:
$FRAMA_CI_BOT_RELEASE_TOKEN
"
\
--data-binary
"@release-data.json"
\
--request
POST
\
"https://git.frama-c.com/api/v4/projects/1113/releases"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment