17 Commits

Author SHA1 Message Date
4d861e1739 Merged with upstream 2022-11-25 01:23:05 +01:00
5acf8e8848 Clearer output text for publish version 2022-11-25 01:21:59 +01:00
103696e01a Clearer output text for publish version 2022-11-25 01:03:59 +01:00
b1018d7f9d Merge branch 'ci/build-and-pypi-publish' of github.com:kevinmidboe/delugeClient into ci/build-and-pypi-publish 2022-11-25 00:56:02 +01:00
7d4f4d0e9b If source is newer than pypi, exit 0 and continue pipeline 2022-11-25 00:38:35 +01:00
2f716e65a3 If source is newer than pypi, exit 0 and continue pipeline 2022-11-25 00:33:22 +01:00
fa59acfd03 Twince check command before upload 2022-11-25 00:01:40 +01:00
120d300b07 Install python dependencies before publish 2022-11-24 23:49:18 +01:00
0faa42a048 Publish depends on build 2022-11-24 23:13:29 +01:00
e2db73bf2a fixed typo in pacakge name 2022-11-24 23:05:28 +01:00
0841fdc03d sync pipenv after install 2022-11-24 22:57:03 +01:00
76c99568a8 try install requirements first 2022-11-24 22:50:04 +01:00
09e496a907 test explicitly defining wheel version 2022-11-24 22:46:54 +01:00
3989523632 add missing pipenv command 2022-11-24 22:43:18 +01:00
30c3e117da test step indentation fking with lint 2022-11-24 22:40:30 +01:00
3fa8c4b18f Add build for amd64 & arm64 arch + start of publish steps 2022-11-24 22:30:03 +01:00
11e9677d1a Split wheel and tarball dist into separate make cmds 2022-11-24 22:29:50 +01:00
4 changed files with 84 additions and 4 deletions

View File

@@ -1,14 +1,67 @@
---
kind: pipeline
type: docker
name: delugeClient
name: Build and test amd64
platform:
os: linux
arch: amd64
steps:
- name: Build package
- name: Build source
image: python:3.10
commands:
- make build
- make build
- name: Install
image: python:3.10
commands:
- make dist
- pip3 install pipenv
- pipenv install
- pipenv sync
- pipenv install dist/delugeClient_kevin-0.3.1-py3-none-any.whl
# - pipenv install pytest
# - name: Run tests
# image: python:3.10
# commands:
# pipenv run pytest
---
kind: pipeline
type: docker
name: Publish package to PyPi
platform:
os: linux
arch: amd64
steps:
- name: Newer version to publish?
image: python:3.10
commands:
- pip3 install delugeClient-kevin -q -q
- bash publish_version?.sh
- name: Test PyPi publish
image: python:3.10
commands:
- make dist
- pip3 install -r requirements.txt
- pip3 install twine
- twine check dist/*
- twine upload --repository delugeClient-kevin dist/*
- name: PyPi publish
image: python:3.10
commands:
- make dist
- pip3 install pipenv
- pipenv install
- pipenv sync
- pipenv install twine
# - pipenv run twine upload dist/*
depends_on:
- Build and test amd64

View File

@@ -7,9 +7,14 @@ install:
build:
python3 setup.py build
dist:
tarball:
python3 setup.py sdist
wheel:
python3 setup.py bdist_wheel
dist: tarball wheel
upload: clean dist
twine upload dist/*

View File

@@ -1 +1,4 @@
__version__ = '0.3.1'
if __name__ == '__main__':
print(__version__)

19
publish_version?.sh Normal file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/bash
PYPI_VERSION=$(pip3 show delugeClient-kevin | awk '$1 ~ /Version:/ { print $2 }')
SOURCE_VERSION=$(python3 delugeClient/__version__.py)
printf "Source version:\t\t %s\n" $SOURCE_VERSION
printf "Remote PyPi version:\t %s\n" $PYPI_VERSION
function version {
echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }';
}
if [ $(version $SOURCE_VERSION) -gt $(version $PYPI_VERSION) ]; then
echo "Soure is newer than remote, publishing!"
exit 0
else
echo "Source is same or oldre than remote, nothing to do."
exit 1
fi