mirror of
https://github.com/actions/python-versions.git
synced 2025-04-06 07:19:41 +00:00
There is no AGENT_TOOLSDIRECTORY on GitHub images (#21)
This change reflects what the Windows installer already does: c0e7ef2c3c/installers/win-setup-template.ps1 (L82-L87)
This commit is contained in:
@ -9,7 +9,14 @@ PYTHON_MAJOR_DOT_MINOR=python$MAJOR_VERSION.$MINOR_VERSION
|
|||||||
PYTHON_MAJORMINOR=python$MAJOR_VERSION$MINOR_VERSION
|
PYTHON_MAJORMINOR=python$MAJOR_VERSION$MINOR_VERSION
|
||||||
PYTHON_FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$BUILD_VERSION
|
PYTHON_FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$BUILD_VERSION
|
||||||
|
|
||||||
PYTHON_TOOLCACHE_PATH=$AGENT_TOOLSDIRECTORY/Python
|
if [ -z ${AGENT_TOOLSDIRECTORY+x} ]; then
|
||||||
|
# No AGENT_TOOLSDIRECTORY on GitHub images
|
||||||
|
TOOLCACHE_ROOT=$RUNNER_TOOL_CACHE
|
||||||
|
else
|
||||||
|
TOOLCACHE_ROOT=$AGENT_TOOLSDIRECTORY
|
||||||
|
fi
|
||||||
|
|
||||||
|
PYTHON_TOOLCACHE_PATH=$TOOLCACHE_ROOT/Python
|
||||||
PYTHON_TOOLCACHE_VERSION_PATH=$PYTHON_TOOLCACHE_PATH/$PYTHON_FULL_VERSION
|
PYTHON_TOOLCACHE_VERSION_PATH=$PYTHON_TOOLCACHE_PATH/$PYTHON_FULL_VERSION
|
||||||
PYTHON_TOOLCACHE_VERSION_ARCH_PATH=$PYTHON_TOOLCACHE_VERSION_PATH/x64
|
PYTHON_TOOLCACHE_VERSION_ARCH_PATH=$PYTHON_TOOLCACHE_VERSION_PATH/x64
|
||||||
|
|
||||||
@ -47,4 +54,4 @@ echo "Upgrading PIP..."
|
|||||||
./python -m pip install --ignore-installed pip
|
./python -m pip install --ignore-installed pip
|
||||||
|
|
||||||
echo "Create complete file"
|
echo "Create complete file"
|
||||||
touch $PYTHON_TOOLCACHE_VERSION_PATH/x64.complete
|
touch $PYTHON_TOOLCACHE_VERSION_PATH/x64.complete
|
||||||
|
Reference in New Issue
Block a user