set a prealpha version
cargo devel CI / cargo CI (push) Successful in 2m0s Details

This commit is contained in:
Christoph J. Scherr 2024-01-23 23:43:02 +01:00
parent fb8b495ad5
commit eb35527f10
Signed by: PlexSheep
GPG Key ID: 7CDD0B14851A08EF
4 changed files with 9 additions and 41 deletions

View File

@ -1,28 +1,20 @@
[package] [package]
name = "autocrate" name = "autocrate"
version = "0.1.0" version = "0.1.0-prealpha.0"
edition = "2021" edition = "2021"
publish = false publish = true
authors = ["Christoph J. Scherr <software@cscherr.de>"] authors = ["Christoph J. Scherr <software@cscherr.de>"]
license = "GPL-3" license = "GPL-3.0-or-later"
description = "Release Manager for Your Projects on Gitea, GitHub, and GitLab" description = "Release Manager for Your Projects on Gitea, GitHub, and GitLab"
readme = "README.md" readme = "README.md"
homepage = "https://git.cscherr.de/PlexSheep/autocrate" homepage = "https://git.cscherr.de/PlexSheep/autocrate"
repository = "https://git.cscherr.de/PlexSheep/autocrate" repository = "https://git.cscherr.de/PlexSheep/autocrate"
categories = ["command-line-utilities", "development-tools"] categories = ["command-line-utilities", "development-tools"]
keywords = [ keywords = [
"ci",
"cd",
"continuous-integration",
"continuous-delivery", "continuous-delivery",
"workflow-automation", "workflow-automation",
"build-tool",
"version-control",
"gitea", "gitea",
"github",
"gitlab",
"changelog", "changelog",
"release-notes",
"automated-builds", "automated-builds",
] ]

View File

@ -1,29 +1,11 @@
#!/bin/bash #!/bin/bash
set -e set -e
cargo check --all-features 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" echo ">>>>>>>> PUBLISHING RELEASE FOR REPO"
bash scripts/release.sh bash scripts/release.sh
echo ">>>>>>>> PUBLISHING TO CRATES.IO NEXT" echo ">>>>>>>> PUBLISHING TO CRATES.IO NEXT"
sleep 10 sleep 2
cargo publish -p libpt-log cargo publish
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" echo ">>>>>>>> PUBLISHING TO CSCHERR.DE NEXT"
sleep 3 sleep 2
cargo publish --registry cscherr -p libpt-log cargo publish --registry cscherr
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

View File

@ -1,15 +1,15 @@
#!/bin/bash #!/bin/bash
TOKEN=$(cat ~/.git-credentials | grep 'git.cscherr.de' | grep -P '(?:)[^:]*(?=@)' -o) TOKEN=$(cat ~/.git-credentials | grep 'git.cscherr.de' | grep -P '(?:)[^:]*(?=@)' -o)
NEW_VERSION=$(cat Cargo.toml | rg '^\s*version\s*=\s*"([^"]*)"\s*$' -or '$1') 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) GIT_COMMIT_SHA=$(git rev-parse HEAD)
REPO=autocrate
BODY=" BODY="
$(git log $(git describe --tags --abbrev=0)..HEAD --pretty="- %s" --oneline --decorate) $(git log $(git describe --tags --abbrev=0)..HEAD --pretty="- %s" --oneline --decorate)
" "
USER=PlexSheep USER=PlexSheep
git tag "v$NEW_VERSION-test" || echo "could not tag" git tag "v$NEW_VERSION-test" || echo "could not tag"
curl -X 'POST' \ 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 'accept: application/json' \
-H "Authorization: token $TOKEN" \ -H "Authorization: token $TOKEN" \
-H 'Content-Type: application/json' \ -H 'Content-Type: application/json' \

View File

@ -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 {} +