Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
ci: ignore Windows-based changes to Git in verify-publish.sh
  • Loading branch information
abrown committed Apr 14, 2022
commit 51bc29a455bd2ae1f3dc4c487a5672f6d8aca53b
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,6 @@ jobs:
- name: Test Rust crate
run: cargo test
- name: Check crates are publishable
run: scripts/verify-publish.sh
# The Windows CI transforms the `c-library` symlink into a real directory, modifying the Git
# state, so we ignore these changes with `--allow-dirty` here.
run: scripts/verify-publish.sh --allow-dirty
6 changes: 4 additions & 2 deletions rust/scripts/verify-publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# Check that the Rust crates can all be packaged up for publication. This cannot use use `cargo
# publish --dry-run` because of the dependency between ittapi and ittapi-sys.
set -e

SCRIPT_ARGS=${@:1}
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
pushd $SCRIPT_DIR

Expand All @@ -19,13 +21,13 @@ directory = "vendor"
EOT

# Package up ittapi-sys and place it in the vendor directory.
cargo package --manifest-path ../ittapi-sys/Cargo.toml
cargo package --manifest-path ../ittapi-sys/Cargo.toml $SCRIPT_ARGS
pushd vendor
tar xf ../../target/package/ittapi-sys-0.*.crate
ITTAPI_SYS_DIR=$(echo ittapi-sys-0.*)
echo '{"files":{}}' > $ITTAPI_SYS_DIR/.cargo-checksum.json
popd

# Package up ittapi.
cargo package --manifest-path ../ittapi/Cargo.toml
cargo package --manifest-path ../ittapi/Cargo.toml $SCRIPT_ARGS
popd