Skip to content

Commit

Permalink
fix: release change log (#1190)
Browse files Browse the repository at this point in the history
* Roll back my previous changes. The previous code is correct. The
release URL is not updated until we upload assets, so it should affect
things.
* The root cause is the checkout action used by github tries to optimize
and does not pull histories of commits besides the head. Consequently,
our script cannot get changelog from the git histories.
  • Loading branch information
jiashenC authored Sep 22, 2023
1 parent 0844f48 commit 636c2e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: master
fetch-depth: 0
- name: Switch to master
run: git checkout master
- name: Install env.
run: |
python -m venv test_evadb
Expand Down
9 changes: 4 additions & 5 deletions script/releasing/releaser.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def release_version(current_version):
run_command(f"git push origin release-{NEXT_RELEASE}")


def get_commit_id_of_latest_release(release_index=0):
def get_commit_id_of_latest_release():
# Default to the latest release.
import requests

Expand All @@ -183,7 +183,7 @@ def get_commit_id_of_latest_release(release_index=0):
response = requests.get(url)
data = response.json()

latest_release = data[release_index]
latest_release = data[0]
release_date = latest_release["created_at"]

return release_date
Expand Down Expand Up @@ -416,9 +416,7 @@ def bump_up_version(next_version):
publish_wheels(current_version_str_without_dev)

if args.upload_assets:
# We assume that we run each command sequentially here. When a new release
# is made, the change log needs to be based on the second latest release.
release_date = get_commit_id_of_latest_release(release_index=1)
release_date = get_commit_id_of_latest_release()
changelog = get_changelog(release_date)
upload_assets(changelog, current_version_str_without_dev)

Expand Down Expand Up @@ -455,3 +453,4 @@ def bump_up_version(next_version):

# BUMP UP VERSION
bump_up_version(next_version)

0 comments on commit 636c2e1

Please # to comment.