Skip to content

Commit

Permalink
Use nightly cargo feature for scripts (#191)
Browse files Browse the repository at this point in the history
* Use nightly cargo feature for scripts
* Cleanup GitHub Action
  • Loading branch information
skmcgrail authored Jul 18, 2023
1 parent 67e4bc3 commit 3a454a7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,6 @@ jobs:
with:
command: install
args: cargo-public-api
- name: Install rust-script
uses: actions-rs/[email protected]
with:
command: install
args: rust-script
- name: Perform API Diff (Target Branch)
if: matrix.diff_target == 'branch'
working-directory: ${{ matrix.crate_dir }}
Expand All @@ -104,7 +99,7 @@ jobs:
working-directory: ${{ matrix.crate_dir }}
shell: bash
run: |
CRATE_NAME=$("${GITHUB_WORKSPACE}"/scripts/tools/cargo-dig.rs -n)
CRATE_NAME="${{ matrix.crate_dir }}"
CRATE_VERSION=$(cargo search --limit 1 ${CRATE_NAME} | head -n 1 | sed -e 's/[^"]*"\([^"]*\)".*/\1/')
cargo public-api diff --deny changed --deny removed "${CRATE_VERSION}"
Expand Down
2 changes: 1 addition & 1 deletion scripts/tools/cargo-dig.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env rust-script
#!/usr/bin/env -S cargo +nightly -Zscript
//! Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
//! SPDX-License-Identifier: Apache-2.0 OR ISC
//! ```cargo
Expand Down
2 changes: 1 addition & 1 deletion scripts/tools/semver.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env rust-script
#!/usr/bin/env -S cargo +nightly -Zscript
//! Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
//! SPDX-License-Identifier: Apache-2.0 OR ISC
//! ```cargo
Expand Down
2 changes: 1 addition & 1 deletion scripts/tools/target-platform.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env rust-script
#!/usr/bin/env -S cargo +nightly -Zscript

// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0 OR ISC
Expand Down

0 comments on commit 3a454a7

Please sign in to comment.