Compare commits

...

8 commits

Author SHA1 Message Date
4772893e8f
release script improvement
Some checks failed
cargo devel CI / cargo CI (push) Has been cancelled
2024-01-18 22:05:46 +01:00
1d9325f89a
Release v0.3.11-alpha.1
All checks were successful
cargo devel CI / cargo CI (push) Successful in 1m58s
2024-01-18 18:50:01 +01:00
e9820de2ab
Release v0.3.11-alpha.0
Some checks failed
cargo devel CI / cargo CI (push) Has been cancelled
2024-01-18 17:49:33 +01:00
ab47ce18bc
script manualisation
Some checks failed
cargo devel CI / cargo CI (push) Has been cancelled
2024-01-18 17:44:21 +01:00
6e791f068d
change in workspace deps to crates.io registry
All checks were successful
cargo devel CI / cargo CI (push) Successful in 1m59s
2024-01-18 17:28:19 +01:00
0edc9c8e08
Release v0.3.10
All checks were successful
cargo devel CI / cargo CI (push) Successful in 2m7s
2024-01-18 17:22:35 +01:00
6a6af66b35
Release v0.3.10
All checks were successful
cargo devel CI / cargo CI (push) Successful in 1m58s
2024-01-18 13:46:32 +01:00
c3555d2fda Merge pull request 'some fixes for hedu' (#64) from devel into master
All checks were successful
cargo devel CI / cargo CI (push) Successful in 1m56s
Reviewed-on: #64
2024-01-18 13:45:26 +01:00
3 changed files with 51 additions and 9 deletions

View file

@ -10,7 +10,7 @@ members = [
default-members = [".", "members/libpt-core"]
[workspace.package]
publish = true
version = "0.3.10-alpha.1"
version = "0.3.11-alpha.1"
edition = "2021"
authors = ["Christoph J. Scherr <software@cscherr.de>"]
license = "MIT"
@ -28,11 +28,11 @@ categories = [
[workspace.dependencies]
anyhow = "1.0.79"
thiserror = "1.0.56"
libpt-core = { version = "0.3.10-alpha.1", path = "members/libpt-core", registry = "cscherr" }
libpt-bintols = { version = "0.3.10-alpha.1", path = "members/libpt-bintols", registry = "cscherr" }
libpt-log = { version = "0.3.10-alpha.1", path = "members/libpt-log", registry = "cscherr" }
libpt-math = { version = "0.3.10-alpha.1", path = "members/libpt-math", registry = "cscherr" }
libpt-net = { version = "0.3.10-alpha.1", path = "members/libpt-net", registry = "cscherr" }
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"

View file

@ -1,10 +1,28 @@
#!/bin/bash
set -e
cargo check --all-features
echo ">>>>>>>> SELECT A NEW VERSION"
cargo ws version --no-git-commit
NEW_VERSION=$(cat Cargo.toml | rg '^\s*version\s*=\s*"([^"]*)"\s*$' -or '$1')
bash scripts/set_all_versions.sh $NEW_VERSION
git add -A
git commit -m "Release v$NEW_VERSION"
cargo ws publish --registry cscherr --no-git-push --publish-as-is || cargo publish --registry cscherr -p libpt
git push
git commit -m "Release v$NEW_VERSION" || (echo ">>>>>>>> COMMIT FAILED OR THERE WAS NOTHING TO COMMIT"; sleep 5)
echo ">>>>>>>> SKIP!!!!!"
cargo ws version --amend
git push || (echo ">>>>>>>> PUSH FAILED OR THERE WAS NOTHING TO PUSH"; sleep 5)
echo ">>>>>>>> PUBLISHING TO CRATES.IO NEXT"
sleep 10
cargo publish -p libpt-log
cargo publish -p libpt-core
cargo publish -p libpt-bintols
cargo publish -p libpt-math
cargo publish -p libpt-net
cargo publish -p libpt
echo ">>>>>>>> PUBLISHING TO CSCHERR.DE NEXT"
sleep 3
cargo publish --registry cscherr -p libpt-log
cargo publish --registry cscherr -p libpt-core
cargo publish --registry cscherr -p libpt-bintols
cargo publish --registry cscherr -p libpt-math
cargo publish --registry cscherr -p libpt-net
cargo publish --registry cscherr -p libpt

24
scripts/release.sh Executable file
View file

@ -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')
VERSION=$(git rev-parse HEAD)
GIT_COMMIT_SHA=$(git rev-parse HEAD)
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/pt/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"