mirror of https://github.com/mtshiba/pylyzer
update upload scripts
This commit is contained in:
parent
d68fd65c77
commit
195890371a
|
|
@ -1,4 +1,9 @@
|
|||
if ($PWD.Path -eq "$HOME\GitHub\pylyzer") {
|
||||
if ($null -eq $env:PYPI_PASSWORD) {
|
||||
echo "set PYPI_PASSWORD environment variable"
|
||||
exit
|
||||
}
|
||||
if ($args[0] -ne "--pip-only") {
|
||||
cd crates/py2erg
|
||||
echo "publish py2erg ..."
|
||||
cargo publish
|
||||
|
|
@ -6,9 +11,11 @@ if ($PWD.Path -eq "$HOME\GitHub\pylyzer") {
|
|||
# timeout 12
|
||||
cd ../../
|
||||
cargo publish
|
||||
}
|
||||
maturin build --release
|
||||
$ver = cat Cargo.toml | rg "^version =" | sed -r 's/^version = "(.*)"/\1/'
|
||||
python -m twine upload "target/wheels/pylyzer-$ver-py3-none-win_amd64.whl" -u mtshiba -p $env:PYPI_PASSWORD
|
||||
$whl = "target/wheels/$(ls target/wheels | Select-Object -ExpandProperty Name | rg "pylyzer-$ver")"
|
||||
python -m twine upload $whl -u mtshiba -p $env:PYPI_PASSWORD
|
||||
echo "completed"
|
||||
} else {
|
||||
echo "use this command in the project root"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
if [ "$PWD" = "$HOME/github/pylyzer" ]; then
|
||||
if [ "$PYPI_PASSWORD" = "" ]; then
|
||||
echo "set PYPI_PASSWORD"
|
||||
exit 1
|
||||
fi
|
||||
if [ "$1" != "--pip-only" ]; then
|
||||
cd crates/py2erg
|
||||
echo "publish py2erg ..."
|
||||
cargo publish
|
||||
|
|
@ -6,9 +11,10 @@ if [ "$PWD" = "$HOME/github/pylyzer" ]; then
|
|||
# timeout 12
|
||||
cd ../../
|
||||
cargo publish
|
||||
fi
|
||||
maturin build --release
|
||||
ver=`cat Cargo.toml | rg "^version =" | sed -r 's/^version = "(.*)"/\1/'`
|
||||
whl=`ls target/wheels | rg "pylyzer-$ver"`
|
||||
whl=target/wheels/`ls target/wheels | rg "pylyzer-$ver"`
|
||||
python3 -m twine upload $whl -u mtshiba -p $PYPI_PASSWORD
|
||||
echo "completed"
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue