Skip to content

Commit 80f5ea4

Browse files
committed
Simplify the script.
1 parent 1b5f602 commit 80f5ea4

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

.appveyor.yml

+3-8
Original file line numberDiff line numberDiff line change
@@ -170,19 +170,14 @@ test_script:
170170
on_success:
171171
- ps: |
172172
Set-PSDebug -Trace 1
173+
$ErrorActionPreference = "Stop"
173174
if ($Env:WHEEL_PATH) {
174175
cmd /E:ON /V:ON /C .\ci\appveyor-with-compiler.cmd $Env:PYTHON_HOME\Scripts\tox --wheel
175-
if ($LastExitCode -eq 0) {
176-
$ErrorActionPreference = "Stop"
177-
iex "$Env:PYTHON_HOME\Scripts\twine check $Env:WHEEL_PATH/*.whl"
178-
iex "$Env:PYTHON_HOME\Scripts\twine upload --repository-url https://test.pypi.org/legacy/ --skip-existing $Env:WHEEL_PATH/*.whl"
179-
}
176+
iex "$Env:PYTHON_HOME\Scripts\twine check $Env:WHEEL_PATH/*.whl"
177+
iex "$Env:PYTHON_HOME\Scripts\twine upload --repository-url https://test.pypi.org/legacy/ --skip-existing $Env:WHEEL_PATH/*.whl"
180178
} else {
181179
cmd /E:ON /V:ON /C .\ci\appveyor-with-compiler.cmd $Env:PYTHON_HOME\Scripts\tox
182180
}
183-
if ($LastExitCode -ne 0) {
184-
throw "Failed with exit code: $LastExitCode"
185-
}
186181
on_failure:
187182
- ps: dir "env:"
188183
- ps: get-content .tox\*\log\*

ci/templates/.appveyor.yml

+3-8
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,14 @@ test_script:
5858
on_success:
5959
- ps: |
6060
Set-PSDebug -Trace 1
61+
$ErrorActionPreference = "Stop"
6162
if ($Env:WHEEL_PATH) {
6263
cmd /E:ON /V:ON /C .\ci\appveyor-with-compiler.cmd $Env:PYTHON_HOME\Scripts\tox --wheel
63-
if ($LastExitCode -eq 0) {
64-
$ErrorActionPreference = "Stop"
65-
iex "$Env:PYTHON_HOME\Scripts\twine check $Env:WHEEL_PATH/*.whl"
66-
iex "$Env:PYTHON_HOME\Scripts\twine upload --repository-url https://test.pypi.org/legacy/ --skip-existing $Env:WHEEL_PATH/*.whl"
67-
}
64+
iex "$Env:PYTHON_HOME\Scripts\twine check $Env:WHEEL_PATH/*.whl"
65+
iex "$Env:PYTHON_HOME\Scripts\twine upload --repository-url https://test.pypi.org/legacy/ --skip-existing $Env:WHEEL_PATH/*.whl"
6866
} else {
6967
cmd /E:ON /V:ON /C .\ci\appveyor-with-compiler.cmd $Env:PYTHON_HOME\Scripts\tox
7068
}
71-
if ($LastExitCode -ne 0) {
72-
throw "Failed with exit code: $LastExitCode"
73-
}
7469
on_failure:
7570
- ps: dir "env:"
7671
- ps: get-content .tox\*\log\*

0 commit comments

Comments
 (0)