mirror of
https://github.com/KevinMidboe/delugeClient.git
synced 2025-12-09 04:28:42 +00:00
Compare commits
17 Commits
snyk-fix-b
...
4d861e1739
| Author | SHA1 | Date | |
|---|---|---|---|
| 4d861e1739 | |||
| 5acf8e8848 | |||
| 103696e01a | |||
| b1018d7f9d | |||
| 7d4f4d0e9b | |||
| 2f716e65a3 | |||
| fa59acfd03 | |||
| 120d300b07 | |||
| 0faa42a048 | |||
| e2db73bf2a | |||
| 0841fdc03d | |||
| 76c99568a8 | |||
| 09e496a907 | |||
| 3989523632 | |||
| 30c3e117da | |||
| 3fa8c4b18f | |||
| 11e9677d1a |
59
.drone.yml
59
.drone.yml
@@ -1,14 +1,67 @@
|
|||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: delugeClient
|
name: Build and test amd64
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
os: linux
|
os: linux
|
||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Build package
|
- name: Build source
|
||||||
image: python:3.10
|
image: python:3.10
|
||||||
commands:
|
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
|
||||||
|
|||||||
7
Makefile
7
Makefile
@@ -7,9 +7,14 @@ install:
|
|||||||
build:
|
build:
|
||||||
python3 setup.py build
|
python3 setup.py build
|
||||||
|
|
||||||
dist:
|
tarball:
|
||||||
python3 setup.py sdist
|
python3 setup.py sdist
|
||||||
|
|
||||||
|
wheel:
|
||||||
|
python3 setup.py bdist_wheel
|
||||||
|
|
||||||
|
dist: tarball wheel
|
||||||
|
|
||||||
upload: clean dist
|
upload: clean dist
|
||||||
twine upload dist/*
|
twine upload dist/*
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1,4 @@
|
|||||||
__version__ = '0.3.1'
|
__version__ = '0.3.1'
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
print(__version__)
|
||||||
|
|||||||
19
publish_version?.sh
Normal file
19
publish_version?.sh
Normal 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
|
||||||
Reference in New Issue
Block a user