generated from PlexSheep/rs-base
add scripts dir for publishing
cargo devel CI / cargo CI (push) Successful in 21s
Details
cargo devel CI / cargo CI (push) Successful in 21s
Details
This commit is contained in:
parent
5c29f3b007
commit
b87a75b5dd
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
cargo check --all-features
|
||||
echo ">>>>>>>> PUBLISHING RELEASE FOR REPO"
|
||||
bash scripts/release.sh
|
||||
echo ">>>>>>>> PUBLISHING TO CRATES.IO NEXT"
|
||||
sleep 2
|
||||
cargo publish
|
||||
echo ">>>>>>>> PUBLISHING TO CSCHERR.DE NEXT"
|
||||
sleep 2
|
||||
cargo publish --registry cscherr
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
TOKEN=$(cat ~/.git-credentials | grep 'git.cscherr.de' | grep -P '(?:)[^:]*(?=@)' -o)
|
||||
NEW_VERSION=$(cat Cargo.toml | rg '^\s*version\s*=\s*"([^"]*)"\s*$' -or '$1')
|
||||
GIT_COMMIT_SHA=$(git rev-parse HEAD)
|
||||
REPO=${PWD##*/} # name of cwd
|
||||
BODY="
|
||||
$(git log $(git describe --tags --abbrev=0)..HEAD --pretty="- %s" --oneline --decorate)
|
||||
"
|
||||
USER=PlexSheep
|
||||
git tag "v$NEW_VERSION-test" || echo "could not tag"
|
||||
curl -X 'POST' \
|
||||
'https://git.cscherr.de/api/v1/repos/PlexSheep/'$REPO'/releases' \
|
||||
-H 'accept: application/json' \
|
||||
-H "Authorization: token $TOKEN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{
|
||||
"body": "'"$BODY"'",
|
||||
"draft": false,
|
||||
"name": "v'$NEW_VERSION'",
|
||||
"prerelease": true,
|
||||
"tag_name": "v'$NEW_VERSION'",
|
||||
"target_commitish": "'$GIT_COMMIT_SHA'"
|
||||
}' | python -m json.tool
|
||||
git push || echo "could not push"
|
Reference in New Issue