-
-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automate release workflow on Windows too.
I initially hoped to have a single Makefile or script that worked on Linux and Windows, but was unable to make it work without massive over-complication. So now we have makefile targets for Linux, and powershell scripts for Windows. Documented in the README.
- Loading branch information
Showing
10 changed files
with
104 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
$syspython="python3.8.exe" | ||
$ve="$HOME\.virtualenvs\colorama" | ||
$bin="$ve\Scripts" | ||
|
||
echo "Create $syspython virtualenv $ve" | ||
& $syspython -m venv --clear "$ve" | ||
& $bin\python.exe -m pip install --upgrade pip | ||
& $bin\python.exe -m pip install -r requirements.txt -r requirements-dev.txt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
$ve="$HOME\.virtualenvs\colorama" | ||
$bin="$ve\Scripts" | ||
|
||
& $bin\python.exe -m pip install --upgrade setuptools wheel | ||
& $bin\python.exe setup.py sdist bdist_wheel | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
$syspython="python3.8.exe" | ||
$ve="$HOME\.virtualenvs\colorama" | ||
|
||
remove-item -r -fo * -I build,dist,MANIFEST,colorama.egg-info,$ve,sandbox | ||
& $syspython -Bc "import pathlib, shutil; [shutil.rmtree(p) for p in pathlib.Path('.').rglob('__pycache__')]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
$ve="$HOME\.virtualenvs\colorama" | ||
$bin="$ve\Scripts" | ||
$version="$(& $bin\python.exe setup.py --version)" | ||
|
||
# Upload to PyPI. | ||
& $bin\twine.exe upload dist\colorama-$version-* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
$syspython="python3.8.exe" | ||
$ve="$HOME\.virtualenvs\colorama" | ||
$bin="$ve\Scripts" | ||
$version="$(& $bin\python.exe setup.py --version)" | ||
|
||
# Upload to the test PyPI. | ||
& $bin\twine.exe upload --repository testpypi dist\colorama-$version-* | ||
if(!$?) { | ||
write-host " > Expect a 400 if package was already uploaded" | ||
} | ||
|
||
# cd elsewhere so we cannot import from local source. | ||
mkdir -force sandbox | out-null | ||
cd sandbox | ||
|
||
# Create a temporary disposable virtualenv. | ||
& $syspython -m venv --clear venv | ||
|
||
# Install the package we just uploaded. | ||
venv\Scripts\python -m pip --quiet install --index-url https://test.pypi.org/simple colorama==$version | ||
# Import and use colorama from the temp virtualenv. | ||
venv\Scripts\python.exe -c @" | ||
import colorama; | ||
colorama.init(); | ||
print(colorama.Fore.GREEN + ""OK Colorama "" + colorama.__version__ + "" from test pypi install."") | ||
"@ | ||
|
||
cd .. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$ve="$HOME\.virtualenvs\colorama" | ||
$bin="$ve\Scripts" | ||
|
||
& $bin\python.exe -m unittest discover -p *_test.py | ||
|