Files
Owais Lone 5d1f3201af Simplify bootstrap and generate code (#514)
- We now automatically generate bootstrap_gen.py file from the list of instrumentations present in the source tree.
- Bootstrap command now uses consumes this auto-generated list instead of keeping it's own local copy.
- We no longer uninstall packages before installing them as instrumentation package no longer specify libraries as dependencies so the edge cases are no longer there.
- We no longer try to install an incompatible version or force upgrade/downgrade an installed version. This used to leave systems in broken states which should happen no more.
2021-06-01 09:19:09 -07:00

37 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
#
# This script:
# 1. parses the version number from the branch name
# 2. updates version.py files to match that version
# 3. iterates through CHANGELOG.md files and updates any files containing
# unreleased changes
# 4. sets the output variable 'version_updated' to determine whether
# the github action to create a pull request should run. this allows
# maintainers to merge changes back into the release branch without
# triggering unnecessary pull requests
#
VERSION=$(./scripts/eachdist.py version --mode stable)-$(./scripts/eachdist.py version --mode prerelease)
echo "Using version ${VERSION}"
# create the release branch
git checkout -b release/${VERSION}
git push origin release/${VERSION}
./scripts/eachdist.py update_versions --versions stable,prerelease
./scripts/generate_setup.py
./scripts/generate_instrumentation_bootstrap.py
rc=$?
if [ $rc != 0 ]; then
echo "::set-output name=version_updated::0"
exit 0
fi
git add .
git commit -m "updating changelogs and version to ${VERSION}"
echo "Time to create a release, here's a sample title:"
echo "[pre-release] Update changelogs, version [${VERSION}]"