diff --git a/Cargo.toml b/Cargo.toml index 95cdafc..0a4bc65 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ members = [ default-members = [".", "members/libpt-core"] [workspace.package] publish = true -version = "0.3.11-alpha.0" +version = "0.3.11-alpha.1" edition = "2021" authors = ["Christoph J. Scherr "] license = "MIT" @@ -28,11 +28,11 @@ categories = [ [workspace.dependencies] anyhow = "1.0.79" thiserror = "1.0.56" -libpt-core = { version = "0.3.11-alpha.0", path = "members/libpt-core" } -libpt-bintols = { version = "0.3.11-alpha.0", path = "members/libpt-bintols" } -libpt-log = { version = "0.3.11-alpha.0", path = "members/libpt-log" } -libpt-math = { version = "0.3.11-alpha.0", path = "members/libpt-math" } -libpt-net = { version = "0.3.11-alpha.0", path = "members/libpt-net" } +libpt-core = { version = "0.3.11-alpha.1", path = "members/libpt-core" } +libpt-bintols = { version = "0.3.11-alpha.1", path = "members/libpt-bintols" } +libpt-log = { version = "0.3.11-alpha.1", path = "members/libpt-log" } +libpt-math = { version = "0.3.11-alpha.1", path = "members/libpt-math" } +libpt-net = { version = "0.3.11-alpha.1", path = "members/libpt-net" } [package] name = "libpt" diff --git a/scripts/release.sh b/scripts/release.sh new file mode 100755 index 0000000..b1adf7d --- /dev/null +++ b/scripts/release.sh @@ -0,0 +1,25 @@ +#!/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') +VERSION=$(git rev-parse HEAD) +GIT_COMMIT_SHA=$(git rev-parse HEAD) +BODY=" + +$(git log $(git describe --tags --abbrev=0)..HEAD --pretty="- %s") +" +USER=PlexSheep +git tag "v$NEW_VERSION" || echo "could not tag" +curl -X 'POST' \ + 'https://git.cscherr.de/api/v1/repos/PlexSheep/pt/releases' \ + -H 'accept: application/json' \ + -H "Authorization: token $TOKEN" \ + -H 'Content-Type: application/json' \ + -d '{ + "body": "'"$BODY"'", + "draft": true, + "name": "string", + "prerelease": true, + "tag_name": "v'$NEW_VERSION'", + "target_commitish": "'$GIT_COMMIT_SHA'" +}' | python -m json.tool +git push || echo "could not push"