uploadproject 1.0.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- uploadproject-1.0.5/PKG-INFO +7 -0
- uploadproject-1.0.5/pyproject.toml +13 -0
- uploadproject-1.0.5/setup.cfg +4 -0
- uploadproject-1.0.5/uploadproject/uploadproject.py +19 -0
- uploadproject-1.0.5/uploadproject.egg-info/PKG-INFO +7 -0
- uploadproject-1.0.5/uploadproject.egg-info/SOURCES.txt +6 -0
- uploadproject-1.0.5/uploadproject.egg-info/dependency_links.txt +1 -0
- uploadproject-1.0.5/uploadproject.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "uploadproject"
|
|
7
|
+
version = "1.0.5"
|
|
8
|
+
description = "Automate Python package versioning, building and publishing"
|
|
9
|
+
requires-python = ">=3.9"
|
|
10
|
+
authors = [
|
|
11
|
+
{name = "Muhəmməd Zeynallı"}
|
|
12
|
+
]
|
|
13
|
+
license = "MIT"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from subprocess import run
|
|
2
|
+
def upm(ignoreInstallErrors=False, ignoreAnotherErrors=False):
|
|
3
|
+
code=f"""
|
|
4
|
+
if ! python -m pip show build &>/dev/null; then
|
|
5
|
+
python -m pip install build{"" if ignoreInstallErrors else "|| exit 1"}
|
|
6
|
+
fi
|
|
7
|
+
if ! python -m pip show twine &>/dev/null; then
|
|
8
|
+
python -m pip install twine{"" if ignoreInstallErrors else "|| exit 1"}
|
|
9
|
+
fi
|
|
10
|
+
version=$(grep -oP '(?<=version = ")[^"]+' pyproject.toml)
|
|
11
|
+
IFS=. read -r major minor patch <<< "$version"
|
|
12
|
+
new_version="$major.$minor.$((patch+1))"
|
|
13
|
+
sed -i "s/version = \"$version\"/version = \"$new_version\"/" pyproject.toml
|
|
14
|
+
rm -rf dist build
|
|
15
|
+
python -m build || exit 1
|
|
16
|
+
python -m twine upload dist/* || exit 1
|
|
17
|
+
echo "Published module in $new_version version"
|
|
18
|
+
"""
|
|
19
|
+
run(["bash", "-c", code], check=not ignoreAnotherErrors)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
uploadproject
|