update publish scripts
This commit is contained in:
		
							
								
								
									
										2
									
								
								build.sh
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								build.sh
									
									
									
									
									
								
							| @@ -1,2 +1,2 @@ | |||||||
| #!/bin/sh - | #!/bin/sh - | ||||||
| python3 setup.py sdist bdist_wheel | python3 -m build | ||||||
|   | |||||||
							
								
								
									
										22
									
								
								publish.sh
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								publish.sh
									
									
									
									
									
								
							| @@ -58,7 +58,27 @@ if [ "$(echo "$PTYPE" | grep -E '(pypi|test)')" = "" ]; then | |||||||
|     exit 1 |     exit 1 | ||||||
| fi | fi | ||||||
|  |  | ||||||
|  | # Set the token | ||||||
|  | _TOKEN=$test_token # Default | ||||||
|  | _REPO="testpypi" | ||||||
|  | if [ "$(echo "$PTYPE" | grep -E '(pypi)')" = "pypi" ]; then | ||||||
|  |     _TOKEN=$pypi_token | ||||||
|  |     _REPO="pypi" | ||||||
|  |     echo "Publishing to PYPI official..." | ||||||
|  | fi | ||||||
|  |  | ||||||
|  | # Upgrade pip packages | ||||||
|  | python3 -m pip install pip --upgrade | ||||||
|  | python3 -m pip install setuptools --upgrade | ||||||
|  | python3 -m pip install wheel --upgrade | ||||||
|  | python3 -m pip install twine --upgrade | ||||||
|  | python3 -m pip install build --upgrade | ||||||
|  |  | ||||||
|  | # build current version | ||||||
|  | # note: mkae sure to update setup.py first | ||||||
|  | python3 -m build | ||||||
|  |  | ||||||
| # command: python3 -m twine upload --username $_USERNAME --password $_TOKEN --non-interactive --repository $_REPO dist/* | # command: python3 -m twine upload --username $_USERNAME --password $_TOKEN --non-interactive --repository $_REPO dist/* | ||||||
| python3 -m twine upload --username $_USERNAME --password $_TOKEN --non-interactive --repository $_REPO dist/* | python3 -m twine upload --verbose --username $_USERNAME --password $_TOKEN --non-interactive --repository $_REPO dist/* | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user