Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Migrate from Python to .NET for release progress reporting #719

Merged
merged 1 commit into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"Google.Cloud.Tools.ReleaseProgressReporter": {
"version": "0.3.0",
"commands": [
"release-progress-reporter"
]
}
}
}
25 changes: 0 additions & 25 deletions .kokoro/README.md

This file was deleted.

26 changes: 4 additions & 22 deletions .kokoro/autorelease.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,13 @@ SCRIPT_DIR=$(dirname "$SCRIPT")

cd $SCRIPT_DIR

# Make sure secrets are loaded in a well known localtion before running releasetool
# Make sure secrets are loaded in a well known location before running
# the release reporter script.
source ./populatesecrets.sh
populate_all_secrets

# Make sure we have the most recent version of pip, then install other packages.
python -m pip install --require-hashes -r pip-requirements.txt
python -m pip install --require-hashes -r requirements.txt
python -m releasetool publish-reporter-script > /tmp/publisher-script

# The publish reporter script uses "python3" which doesn't exist on Windows.
# Work out what we should use instead.
# Try to detect Python 3. It's quite different between Windows and Linux.
if which python > /dev/null && python --version 2>&1 | grep -q "Python 3"; then declare -r PYTHON3=python
elif which py > /dev/null && py -3 --version 2>&1 | grep -q "Python 3"; then declare -r PYTHON3="py -3"
elif which python3 > /dev/null && python3 --version 2>&1 | grep -q "Python 3"; then declare -r PYTHON3=python3
else
echo "Unable to detect Python 3 installation."
exit 1
fi

# Fix up the publish reporter script using $PYTHON3. We assume this won't
# be harmful within sed - at the moment it's always "python", "py -3" or "python3".
sed -i "s/python3/$PYTHON3/g" /tmp/publisher-script

source /tmp/publisher-script
dotnet tool restore
source <(dotnet release-progress-reporter publish-reporter-script)

# Secrets are already populated, let's not do that again
./release.sh --skippopulatesecrets
2 changes: 0 additions & 2 deletions .kokoro/pip-requirements.txt

This file was deleted.

Loading