Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
Potentially fixes #44
  • Loading branch information
jD91mZM2 committed May 31, 2020
1 parent 787ea51 commit 4a2fe57
Show file tree
Hide file tree
Showing 6 changed files with 1,711 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 21 additions & 9 deletions publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,39 @@ eval "$VISUAL" README.md
echo "Looks good? Press enter to continue."
read -r

echo "Running tests..."
cargo check
cargo test

do_package() {
echo "Running tests..."
cargo check --manifest-path "$1/Cargo.toml"
cargo test --manifest-path "$1/Cargo.toml"

# If the lock file is changed, update that
git reset
git add "$1/Cargo.lock"
git commit --amend --no-edit

echo "Making sure packaging works..."
cargo publish --dry-run --manifest-path "$1"/Cargo.toml

version="$(sed -e 's/^version\s*=\s*"\([0-9]\+\.[0-9]\+\.[0-9]\+\)"/\1/' -e t -e d "$1"/Cargo.toml | head -n1)"

git status

echo "Publishing version $version of $1!!! Press enter to continue."
echo "Publishing $1!!! Press enter to continue."
read -r

cargo publish --manifest-path "$1"/Cargo.toml
}

mv Cargo.toml Cargo.toml.bak
cleanup() {
mv Cargo.toml.bak Cargo.toml
}
trap cleanup SIGINT

do_package xidlehook-core
echo "Waiting for crates.io to update"
sleep 5

do_package xidlehook-daemon # sets "$version"
git tag "$version" --annotate --sign -m "xidlehook $version"
do_package xidlehook-daemon

echo "Now make a tag! Yay!"

cleanup
Loading

0 comments on commit 4a2fe57

Please sign in to comment.