Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Framasoft
Framadate
Framadate
Commits
ac932e55
Verified
Commit
ac932e55
authored
Dec 21, 2021
by
Thomas Citharel
🏃🏻
Browse files
Add release file
Signed-off-by:
Thomas Citharel
<
tcit@tcit.fr
>
parent
fb04860c
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
release.sh
0 → 100755
View file @
ac932e55
#!/bin/bash
set
-eu
if
[
-z
"
$1
"
]
;
then
echo
"Need version as argument"
exit
-1
fi
version
=
"
$1
"
changelog
=
$(
awk
-v
version
=
"
$version
"
'/^## / { printit = $2 == version }; printit'
CHANGELOG.md |
grep
-v
"##
$version
"
|
sed
'1{/^$/d}'
)
printf
"Changelog will be:
\\
n
\\
n%s
\\
n
\\
n"
"
$changelog
"
read
-p
"Are you sure to release? "
-n
1
-r
echo
if
[[
!
$REPLY
=
~ ^[Yy]
$
]]
;
then
exit
0
fi
git tag
-s
-a
"
$version
"
-m
"
$changelog
"
git push origin
"
$version
"
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