forked from asyrjasalo/RESTinstance
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease.sh
More file actions
executable file
·30 lines (25 loc) · 898 Bytes
/
release.sh
File metadata and controls
executable file
·30 lines (25 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
# RESTinstance (https://github.com/asyrjasalo/RESTinstance)
# Robot Framework library for RESTful JSON APIs.
#
# Copyright(C) 2018- Anssi Syrjäsalo (http://a.syrjasalo.com)
# Licensed under GNU Lesser General Public License v3 (LGPL-3.0).
prerelease_type="$1"
branch="$(git branch --show-current)"
if [ "$branch" != "main" ] && [ "$branch" != "master" ]; then
echo "Error: Releases must be created from trunk, run $0 in main/master."
exit 1
fi
if [ -n "$(git status -s)" ]; then
echo "Error: Working tree has changes: Stash, commit or reset first"
exit 1
fi
if [ -n "$prerelease_type" ]; then
echo "Creating pre-release ($prerelease_type)"
uvx --from commitizen cz bump --prerelease "$prerelease_type" \
--allow-no-commit &&
pdm publish --repository testpypi
else
uvx --from commitizen cz bump --allow-no-commit &&
pdm publish
fi