Skip to content

Commit

Permalink
Fix py module release (#2057)
Browse files Browse the repository at this point in the history
* Remove release steps on creating/drafting a new project board

Signed-off-by: wslulciuc <willy@datakin.com>

* Add new line

Signed-off-by: wslulciuc <willy@datakin.com>
  • Loading branch information
wslulciuc authored Aug 2, 2022
1 parent d5a4251 commit 272ecb6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 24 deletions.
9 changes: 2 additions & 7 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@
3. Visit [CI](https://app.circleci.com/pipelines/github/MarquezProject/marquez?branch=main) to see the progress of the release! :rocket:
4. Visit [sonatype](https://oss.sonatype.org) to promote _java_ artifacts
5. Create a [new project](https://github.com/MarquezProject/marquez/projects/new) board for the _next_ release using the _automated kanban_ template:

![](./docs/assets/images/new-project-board.png)

6. Before closing the project board for the _current_ release, move any open issues to the project board created in **step 5**
7. Draft a [new release](https://github.com/MarquezProject/marquez/releases/new) using the release notes for `X.Y.Z` in **step 1** as the release description:
6. Draft a [new release](https://github.com/MarquezProject/marquez/releases/new) using the release notes for `X.Y.Z` in **step 1** as the release description:

![](./docs/assets/images/new-release.png)

Expand All @@ -32,4 +27,4 @@ Alternatively, if after 2 days the release has received at least one +1 and no -

If the proposed release receives no +1s in two days, it is not authorized and the proposer must make a new request to reset the clock.

Once a release is authorized, it will be initiated within two business days. Releases will not be made on a Friday unless doing so will address an important defect, an issue with project infrastructure, or a security vulnerability.
Once a release is authorized, it will be initiated within two business days. Releases will not be made on a Friday unless doing so will address an important defect, an issue with project infrastructure, or a security vulnerability.
29 changes: 12 additions & 17 deletions new-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,39 +122,34 @@ if [[ "${RELEASE_VERSION}" == *-rc.? ]]; then
PYTHON_RELEASE_VERSION="${RELEASE_VERSION%-*}${RELEASE_CANDIDATE//.}"
fi

# (1) Bump python module versions
PYTHON_MODULES=(clients/python/)
for PYTHON_MODULE in "${PYTHON_MODULES[@]}"; do
(cd "${PYTHON_MODULE}" && bump2version manual --new-version "${PYTHON_RELEASE_VERSION}" --allow-dirty)
done

# (2) Bump java module versions
# (1) Bump java module versions
sed -i "" "s/version=.*/version=${RELEASE_VERSION}/g" gradle.properties

# (3) Bump version in helm chart
# (2) Bump version in helm chart
sed -i "" "s/^version:.*/version: ${RELEASE_VERSION}/g" ./chart/Chart.yaml
sed -i "" "s/tag:.*/tag: ${RELEASE_VERSION}/g" ./chart/values.yaml

# (4) Bump version in scripts
# (3) Bump version in scripts
sed -i "" "s/TAG=\d.*/TAG=${RELEASE_VERSION}/g" ./docker/up.sh
sed -i "" "s/TAG=\d.*/TAG=${RELEASE_VERSION}/g" .env.example

# (5) Bump version in docs
# (4) Bump version in docs
sed -i "" "s/^ version:.*/ version: ${RELEASE_VERSION}/g" ./spec/openapi.yml
sed -i "" "s/<version>.*/<version>${RELEASE_VERSION}<\/version>/g" ./clients/java/README.md
sed -i "" "s/marquez-java:.*/marquez-java:${RELEASE_VERSION}/g" ./clients/java/README.md

# (6) Bundle openAPI docs
# (5) Bundle openAPI docs
redoc-cli bundle spec/openapi.yml --output docs/openapi.html --title "Marquez API Reference"

# (7) Prepare release commit
# (6) Prepare release commit
git commit -sam "Prepare for release ${RELEASE_VERSION}" --no-verify

# (8) Pull latest tags, then prepare release tag
# (7) Pull latest tags, then prepare release tag
git fetch --all --tags
git tag -a "${RELEASE_VERSION}" -m "marquez ${RELEASE_VERSION}"

# (9) Prepare next development version for python and java modules
# (8) Prepare next development version for python and java modules
PYTHON_MODULES=(clients/python/)
for PYTHON_MODULE in "${PYTHON_MODULES[@]}"; do
(cd "${PYTHON_MODULE}" && bump2version manual --new-version "${NEXT_VERSION}" --allow-dirty)
done
Expand All @@ -167,10 +162,10 @@ fi
sed -i "" "s/version=.*/version=${NEXT_VERSION}/g" gradle.properties
sed -i "" "s/^ version:.*/ version: ${NEXT_VERSION}/g" ./spec/openapi.yml

# (10) Prepare next development version commit
# (9) Prepare next development version commit
git commit -sam "Prepare next development version ${NEXT_VERSION}" --no-verify

# (11) Check for commits in log
# (10) Check for commits in log
COMMITS=false
MESSAGE_1=$(git log -1 --grep="Prepare for release ${RELEASE_VERSION}" --pretty=format:%s)
MESSAGE_2=$(git log -1 --grep="Prepare next development version ${NEXT_VERSION}" --pretty=format:%s)
Expand All @@ -182,7 +177,7 @@ else
exit 0
fi

# (12) Push commits and tag
# (11) Push commits and tag
if [[ $COMMITS = "true" ]] && [[ ${PUSH} = "true" ]]; then
git push origin main && \
git push origin "${RELEASE_VERSION}"
Expand Down

0 comments on commit 272ecb6

Please sign in to comment.