mirror of
https://code.forgejo.org/actions/forgejo-release.git
synced 2024-12-22 07:35:48 +02:00
Merge pull request 'Script cleanup' (#27) from natct/forgejo-release:cleanup into main
Reviewed-on: https://code.forgejo.org/actions/forgejo-release/pulls/27 Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
This commit is contained in:
commit
a4252003d2
2 changed files with 16 additions and 3 deletions
10
.editorconfig
Normal file
10
.editorconfig
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
tab_width = 4
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
|
@ -43,9 +43,12 @@ ensure_tag() {
|
||||||
|
|
||||||
upload_release() {
|
upload_release() {
|
||||||
local assets=$(ls $RELEASE_DIR/* | sed -e 's/^/-a /')
|
local assets=$(ls $RELEASE_DIR/* | sed -e 's/^/-a /')
|
||||||
local releasetype
|
if $PRERELEASE || echo "${TAG}" | grep -qi '\-rc' ; then
|
||||||
( $PRERELEASE || echo "${TAG}" | grep -qi '\-rc' ) && export releasetype="--prerelease" && echo "Uploading as Pre-Release"
|
releasetype="--prerelease"
|
||||||
test ${releasetype+false} || echo "Uploading as Stable"
|
echo "Uploading as Pre-Release"
|
||||||
|
else
|
||||||
|
echo "Uploading as Stable"
|
||||||
|
fi
|
||||||
ensure_tag
|
ensure_tag
|
||||||
anchor=$(echo $TAG | sed -e 's/^v//' -e 's/[^a-zA-Z0-9]/-/g')
|
anchor=$(echo $TAG | sed -e 's/^v//' -e 's/[^a-zA-Z0-9]/-/g')
|
||||||
if ! $BIN_DIR/tea release create $assets --repo $REPO --note "$RELEASENOTES" --tag $TAG --title "$TITLE" --draft ${releasetype} >& $TMP_DIR/tea.log ; then
|
if ! $BIN_DIR/tea release create $assets --repo $REPO --note "$RELEASENOTES" --tag $TAG --title "$TITLE" --draft ${releasetype} >& $TMP_DIR/tea.log ; then
|
||||||
|
|
Loading…
Reference in a new issue