From 372c3dc51cc8874c35b661207b1e77f4cb47bbc2 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Tue, 23 Jan 2024 23:43:02 +0100 Subject: [PATCH] set a prealpha version --- Cargo.toml | 6 +++--- scripts/publish.sh | 26 ++++---------------------- scripts/release.sh | 4 ++-- scripts/set_all_versions.sh | 6 ------ 4 files changed, 9 insertions(+), 33 deletions(-) delete mode 100755 scripts/set_all_versions.sh diff --git a/Cargo.toml b/Cargo.toml index 9154662..61a950e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "autocrate" -version = "0.1.0" +version = "0.1.0-prealpha.0" edition = "2021" -publish = false +publish = true authors = ["Christoph J. Scherr "] -license = "GPL-3" +license = "GPL-3.0-or-later" description = "Release Manager for Your Projects on Gitea, GitHub, and GitLab" readme = "README.md" homepage = "https://git.cscherr.de/PlexSheep/autocrate" diff --git a/scripts/publish.sh b/scripts/publish.sh index 2187a89..4a3d17d 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -1,29 +1,11 @@ #!/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" || (echo ">>>>>>>> COMMIT FAILED OR THERE WAS NOTHING TO COMMIT"; sleep 5) -echo ">>>>>>>> SKIP!!!!!" -cargo ws version --amend echo ">>>>>>>> PUBLISHING RELEASE FOR REPO" bash scripts/release.sh 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 +sleep 2 +cargo publish 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 +sleep 2 +cargo publish --registry cscherr diff --git a/scripts/release.sh b/scripts/release.sh index af1d8da..c2d0685 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -1,15 +1,15 @@ #!/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) +REPO=autocrate 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' \ + 'https://git.cscherr.de/api/v1/repos/PlexSheep/'$REPO'/releases' \ -H 'accept: application/json' \ -H "Authorization: token $TOKEN" \ -H 'Content-Type: application/json' \ diff --git a/scripts/set_all_versions.sh b/scripts/set_all_versions.sh deleted file mode 100755 index 0c89340..0000000 --- a/scripts/set_all_versions.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -export NEW_VER=$1 -pwd -sed -i 's/\(^\s*version\)\s*=\s*"\([^"]*\)"$/\1 = "'$NEW_VER'"/g' Cargo.toml -find * -name 'Cargo.toml' -type f \ - -exec sed -i 's/\(libpt.*version\s*=\s*\)"[^"]*"/\1"'$NEW_VER'"/g' Cargo.toml {} +