mirror of
				https://github.com/KevinMidboe/delugeClient.git
				synced 2025-10-29 12:00:13 +00:00 
			
		
		
		
	Clearer output text for publish version
This commit is contained in:
		| @@ -41,7 +41,7 @@ steps: | |||||||
|   - name: Newer version to publish? |   - name: Newer version to publish? | ||||||
|     image: python:3.10 |     image: python:3.10 | ||||||
|     commands: |     commands: | ||||||
|       - pip3 install delugeClient-kevin |       - pip3 install delugeClient-kevin --quiet | ||||||
|       - bash publish_version?.sh |       - bash publish_version?.sh | ||||||
|  |  | ||||||
|   - name: Test PyPi publish |   - name: Test PyPi publish | ||||||
|   | |||||||
| @@ -3,18 +3,17 @@ | |||||||
| PYPI_VERSION=$(pip3 show delugeClient-kevin | awk '$1 ~ /Version:/ { print $2 }') | PYPI_VERSION=$(pip3 show delugeClient-kevin | awk '$1 ~ /Version:/ { print $2 }') | ||||||
| SOURCE_VERSION=$(python3 delugeClient/__version__.py) | SOURCE_VERSION=$(python3 delugeClient/__version__.py) | ||||||
|  |  | ||||||
| echo "hello" | printf "Source version:\t\t %s\n" $SOURCE_VERSION | ||||||
| echo "pypi version: $PYPI_VERSION" | printf "Remote PyPi version:\t %s\n" $PYPI_VERSION | ||||||
| echo "source version: $SOURCE_VERSION" |  | ||||||
|  |  | ||||||
| function version { | function version { | ||||||
|   echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; |   echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; | ||||||
| } | } | ||||||
|  |  | ||||||
| if [ $(version $SOURCE_VERSION) -gt $(version $PYPI_VERSION) ]; then | if [ $(version $SOURCE_VERSION) -gt $(version $PYPI_VERSION) ]; then | ||||||
|   echo "source is newer than pypi" |   echo "Soure is newer than remote, publishing!" | ||||||
|   exit 0 |   exit 0 | ||||||
| else | else | ||||||
|  |   echo "Source is same or oldre than remote, nothing to do." | ||||||
|   exit 1 |   exit 1 | ||||||
|   echo "source is same or oldre, but not newer" |  | ||||||
| fi | fi | ||||||
		Reference in New Issue
	
	Block a user