Skip to content

Commit 3a454a7

Browse files
authored
Use nightly cargo feature for scripts (#191)
* Use nightly cargo feature for scripts * Cleanup GitHub Action
1 parent 67e4bc3 commit 3a454a7

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,6 @@ jobs:
9090
with:
9191
command: install
9292
args: cargo-public-api
93-
- name: Install rust-script
94-
uses: actions-rs/cargo@v1.0.3
95-
with:
96-
command: install
97-
args: rust-script
9893
- name: Perform API Diff (Target Branch)
9994
if: matrix.diff_target == 'branch'
10095
working-directory: ${{ matrix.crate_dir }}
@@ -104,7 +99,7 @@ jobs:
10499
working-directory: ${{ matrix.crate_dir }}
105100
shell: bash
106101
run: |
107-
CRATE_NAME=$("${GITHUB_WORKSPACE}"/scripts/tools/cargo-dig.rs -n)
102+
CRATE_NAME="${{ matrix.crate_dir }}"
108103
CRATE_VERSION=$(cargo search --limit 1 ${CRATE_NAME} | head -n 1 | sed -e 's/[^"]*"\([^"]*\)".*/\1/')
109104
cargo public-api diff --deny changed --deny removed "${CRATE_VERSION}"
110105

scripts/tools/cargo-dig.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env rust-script
1+
#!/usr/bin/env -S cargo +nightly -Zscript
22
//! Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
//! SPDX-License-Identifier: Apache-2.0 OR ISC
44
//! ```cargo

scripts/tools/semver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env rust-script
1+
#!/usr/bin/env -S cargo +nightly -Zscript
22
//! Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
//! SPDX-License-Identifier: Apache-2.0 OR ISC
44
//! ```cargo

scripts/tools/target-platform.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env rust-script
1+
#!/usr/bin/env -S cargo +nightly -Zscript
22

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

0 commit comments

Comments
 (0)