Skip to content

Commit e4cb698

Browse files
authored
fix!: add proof-of-sql-planner description && check for existing published crate before publishing (#760)
Please be sure to look over the pull request guidelines here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/blob/main/CONTRIBUTING.md#submit-pr. # Please go through the following checklist - [x] The PR title and commit messages adhere to guidelines here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/blob/main/CONTRIBUTING.md. In particular `!` is used if and only if at least one breaking change has been introduced. - [x] I have run the ci check script with `source scripts/run_ci_checks.sh`. - [x] I have run the clean commit check script with `source scripts/check_commits.sh`, and the commit history is certified to follow clean commit guidelines as described here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/blob/main/COMMIT_GUIDELINES.md - [x] The latest changes from `main` have been incorporated to this PR by simple rebase if possible, if not, then conflicts are resolved appropriately. # Rationale for this change `proof-of-sql` and `proof-of-sql-parser` 0.94.0 have already been released. Hence we made a few changes. <!-- Why are you proposing this change? If this is already explained clearly in the linked issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. Example: Add `NestedLoopJoinExec`. Closes #345. Since we added `HashJoinExec` in #323 it has been possible to do provable inner joins. However performance is not satisfactory in some cases. Hence we need to fix the problem by implement `NestedLoopJoinExec` and speed up the code for `HashJoinExec`. --> # What changes are included in this PR? - check for existence of crate before publishing in CI - add description to `proof-of-sql-planner` crate enabling its publishing <!-- There is no need to duplicate the description in the ticket here but it is sometimes worth providing a summary of the individual changes in this PR. Example: - Add `NestedLoopJoinExec`. - Speed up `HashJoinExec`. - Route joins to `NestedLoopJoinExec` if the outer input is sufficiently small. --> # Are these changes tested? <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? Example: Yes. --> Yes.
2 parents 1f36075 + 071ddd7 commit e4cb698

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed

.github/workflows/release.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ jobs:
2828
uses: actions/setup-node@v3
2929
with:
3030
node-version: "20.x"
31+
- name: Install cargo info
32+
run: |
33+
cargo install cargo-info
3134
- name: Semantic Release
3235
run: |
3336
npm install semantic-release

ci/publish.sh

+11-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ fi
1414
sed -i 's/version = "*.*.*" # DO NOT CHANGE THIS LINE! This will be automatically updated/version = "'${NEW_VERSION}'"/' Cargo.toml
1515
sed -i 's/path = "[^"]*"/version = "'${NEW_VERSION}'"/g' Cargo.toml
1616

17-
cargo publish -p proof-of-sql-parser --token ${CRATES_TOKEN}
18-
cargo publish -p proof-of-sql --token ${CRATES_TOKEN}
19-
cargo publish -p proof-of-sql-planner --token ${CRATES_TOKEN}
17+
CRATES=("proof-of-sql-parser" "proof-of-sql" "proof-of-sql-planner")
18+
19+
for crate in "${CRATES[@]}"; do
20+
echo "Attempting to see if ${crate}@${NEW_VERSION} is published already..."
21+
if cargo info "${crate}@${NEW_VERSION}" >/dev/null 2>&1; then
22+
echo "The version ${NEW_VERSION} for ${crate} is already on crates.io. Skipping publish."
23+
else
24+
echo "${crate}@${NEW_VERSION} not found, publishing..."
25+
cargo publish -p "${crate}" --token "${CRATES_TOKEN}"
26+
fi
27+
done

crates/proof-of-sql-planner/Cargo.toml

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
[package]
2-
name = "proof-of-sql-planner"
32
publish = true
4-
edition.workspace = true
5-
exclude.workspace = true
6-
repository.workspace = true
7-
version.workspace = true
8-
license-file.workspace = true
3+
name = "proof-of-sql-planner"
4+
version = { workspace = true }
5+
edition = { workspace = true }
6+
repository = { workspace = true }
7+
description = "SQL query planner for proof-of-sql."
8+
exclude = { workspace = true }
9+
license-file = { workspace = true }
910

1011
[lib]
1112
crate-type = ["cdylib", "rlib"]

0 commit comments

Comments
 (0)