Skip to content

Commit

Permalink
create relase script
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeansen committed Jan 29, 2022
1 parent e988dfb commit 80f8840
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions create_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash

mkdir -p ${WORKSPACE_TMP}

[[ -e create_chroot.sh ]] && ./create_chroot.sh bullseye || exit 1

tar --exclude="./.*" -zcf ${WORKSPACE_TMP}/${BUILD_TAG}.tar.gz -C ${WORKSPACE} .

tag=$(git describe --abbrev=0 --tags )

id=$(curl -X 'POST' \
'https://cloud:3001/api/v1/repos/marcel/bcrm/releases' \
-H 'accept: application/json' \
-H 'Authorization: token 8ed5c35cd994090c1105f8bd082c3ff94936aa84' \
-H 'Content-Type: application/json' \
-d '{
"draft": false,
"name": "${BUILD_TAG}",
"prerelease": true,
"tag_name": "$tag"
}')

curl -X 'POST' \
"https://cloud:3001/api/v1/repos/marcel/bcrm/releases/$id/assets?name=x" \
-H 'accept: application/json' \
-H 'Authorization: token 8ed5c35cd994090c1105f8bd082c3ff94936aa84' \
-H 'Content-Type: multipart/form-data' \
-F "attachment=@${WORKSPACE_TMP}/${BUILD_TAG}.tar.gz"

0 comments on commit 80f8840

Please sign in to comment.