mirror of https://github.com/mtshiba/pylyzer
update upload scripts
This commit is contained in:
parent
d68fd65c77
commit
195890371a
|
|
@ -1,14 +1,21 @@
|
||||||
if ($PWD.Path -eq "$HOME\GitHub\pylyzer") {
|
if ($PWD.Path -eq "$HOME\GitHub\pylyzer") {
|
||||||
cd crates/py2erg
|
if ($null -eq $env:PYPI_PASSWORD) {
|
||||||
echo "publish py2erg ..."
|
echo "set PYPI_PASSWORD environment variable"
|
||||||
cargo publish
|
exit
|
||||||
# from cargo 1.66 timeout is not needed
|
}
|
||||||
# timeout 12
|
if ($args[0] -ne "--pip-only") {
|
||||||
cd ../../
|
cd crates/py2erg
|
||||||
cargo publish
|
echo "publish py2erg ..."
|
||||||
|
cargo publish
|
||||||
|
# from cargo 1.66 timeout is not needed
|
||||||
|
# timeout 12
|
||||||
|
cd ../../
|
||||||
|
cargo publish
|
||||||
|
}
|
||||||
maturin build --release
|
maturin build --release
|
||||||
$ver = cat Cargo.toml | rg "^version =" | sed -r 's/^version = "(.*)"/\1/'
|
$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"
|
echo "completed"
|
||||||
} else {
|
} else {
|
||||||
echo "use this command in the project root"
|
echo "use this command in the project root"
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,20 @@
|
||||||
if [ "$PWD" = "$HOME/github/pylyzer" ]; then
|
if [ "$PWD" = "$HOME/github/pylyzer" ]; then
|
||||||
cd crates/py2erg
|
if [ "$PYPI_PASSWORD" = "" ]; then
|
||||||
echo "publish py2erg ..."
|
echo "set PYPI_PASSWORD"
|
||||||
cargo publish
|
exit 1
|
||||||
# from cargo 1.66 timeout is not needed
|
fi
|
||||||
# timeout 12
|
if [ "$1" != "--pip-only" ]; then
|
||||||
cd ../../
|
cd crates/py2erg
|
||||||
cargo publish
|
echo "publish py2erg ..."
|
||||||
|
cargo publish
|
||||||
|
# from cargo 1.66 timeout is not needed
|
||||||
|
# timeout 12
|
||||||
|
cd ../../
|
||||||
|
cargo publish
|
||||||
|
fi
|
||||||
maturin build --release
|
maturin build --release
|
||||||
ver=`cat Cargo.toml | rg "^version =" | sed -r 's/^version = "(.*)"/\1/'`
|
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
|
python3 -m twine upload $whl -u mtshiba -p $PYPI_PASSWORD
|
||||||
echo "completed"
|
echo "completed"
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue