Skip to content

Commit 38f50f9

Browse files
ludochgae-java-bot
authored andcommitted
Upgrade Python to 3.12 for docuploader in publish_javadoc.sh
PiperOrigin-RevId: 819820626 Change-Id: I7dbbba78f8e740c118f0faaf7cbdcf44d23c7ab7
1 parent 35a01cf commit 38f50f9

1 file changed

Lines changed: 17 additions & 7 deletions

File tree

kokoro/gcp_ubuntu/publish_javadoc.sh

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,27 @@ set -e
1919
shopt -s globstar
2020

2121
setup_docuploader() {
22-
curl -fsSL --retry 10 -o /tmp/jar1.jar https://github.com/googleapis/java-docfx-doclet/releases/download/1.9.0/docfx-doclet-1.9.0-jar-with-dependencies.jar
23-
# Update Python 3 and Maven
24-
sudo apt-get update
25-
sudo apt-get install -y software-properties-common
26-
sudo add-apt-repository -y ppa:deadsnakes/ppa
27-
sudo apt-get update
28-
sudo apt-get install -y python3.12 python3.12-venv python3-pip maven
22+
curl -fsSL --retry 10 -o /tmp/jar1.jar https://github.com/googleapis/java-docfx-doclet/releases/download/1.9.0/docfx-doclet-1.9.0-jar-with-dependencies.jar
23+
# Update Python 3 and Maven
24+
25+
# Refresh repositories and general system update
26+
sudo apt update && sudo apt upgrade -y
27+
sudo apt-get install -y software-properties-common
28+
# Required to refresh and add new PPA for Python3.12
29+
sudo add-apt-repository -y ppa:deadsnakes/ppa
30+
sudo apt update
31+
# Upgrade Python 3.8 to Python 3.12
32+
sudo apt install -y python3.12 python3.12-venv maven
33+
34+
2935
# install docuploader package with upgrade to get latest correct versions.
3036
echo "Trying to install gcp-docuploader."
3137
python3.12 -m venv env
3238
source env/bin/activate
39+
40+
# Print Python version, should print 3.12
41+
python --version
42+
3343
cat > /tmp/requirements.txt << EOF
3444
#
3545
# This file is autogenerated by pip-compile with Python 3.12

0 commit comments

Comments
 (0)