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

build: Fix build script to commit all files post version bump #363

Merged
merged 2 commits into from
Mar 19, 2024
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
2 changes: 1 addition & 1 deletion cog.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ post_package_bump_hooks = [
"../../tools/extract_changelog.sh CHANGELOG.md > ../../releases/GITHUB_CHANGELOG-{{package}}.md",
# update the version number to have a `dev0` suffix
"../../tools/update_version.sh {{package}} {{version}} --dev",
"git commit -m 'chore(version): update {{package}} version to {{version}}'",
"git commit --all --message 'chore(version): update {{package}} version to {{version}}'",
mofojed marked this conversation as resolved.
Show resolved Hide resolved
# push the tag and the commits to main
"git push origin {{package}}-v{{version}}",
"git push origin main",
Expand Down
23 changes: 12 additions & 11 deletions tools/update_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,12 @@ function update_file() {
else
sed -e "s/${prefix}.*/${expected}/g" -i "$ROOT_DIR/plugins/$file"
fi
git add "$ROOT_DIR/plugins/$file"
fi
}

extra=
[ "$dev" = true ] && extra=".dev0"
case "$package" in
auth-keycloak)
update_file auth-keycloak/src/js/package.json '"version": "' '",'
;;
dashboard-object-viewer)
update_file dashboard-object-viewer/src/js/package.json '"version": "' '",'
;;
json)
update_file json/src/deephaven/plugin/json/__init__.py '__version__ = "' '"' "$extra"
;;
Expand All @@ -132,9 +125,6 @@ case "$package" in
plotly-express)
update_file plotly-express/setup.cfg 'version = ' '' "$extra"
;;
table-example)
update_file table-example/src/js/package.json '"version": "' '",'
;;
ui)
update_file ui/setup.cfg 'version = ' '' "$extra"
;;
Expand All @@ -144,6 +134,9 @@ case "$package" in
packaging)
update_file packaging/setup.cfg 'version = ' '' "$extra"
;;
auth-keycloak | dashboard-object-viewer | table-example)
# Packages that don't have any Python to publish, just ignore
;;
*)
{
log_error "Unhandled plugin $package. You will need to add wiring in $SCRIPT_NAME"
Expand All @@ -155,10 +148,18 @@ esac
npm_version="${version}"
[ "$dev" = true ] && npm_version="${version}-dev0"
case "$package" in
matplotlib | plotly | plotly-express | ui)
auth-keycloak | dashboard-object-viewer | matplotlib | plotly | plotly-express | table-example | ui)
mofojed marked this conversation as resolved.
Show resolved Hide resolved
# The working directory is already `plugins/<package-name>`, so we just specify workspace as `src/js` and it does the right thing
npm version "$npm_version" --workspace=src/js
;;
json | packaging | utilities)
# Packages that don't have any JS to publish, just ignore
;;
*)
{
log_error "Unhandled JS plugin $package. You will need to add JS wiring in $SCRIPT_NAME"
exit 90
}
esac

log_info "Done updating $package version to $version${extra}"
Loading