Skip to content

Commit

Permalink
chore: add scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
yash-atreya committed Aug 22, 2024
1 parent f999c5b commit 6dd27ac
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
24 changes: 24 additions & 0 deletions scripts/changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -eo pipefail

run_unless_dry_run() {
if [ "$DRY_RUN" = "true" ]; then
echo "skipping due to dry run: $*" >&2
else
"$@"
fi
}

root=$WORKSPACE_ROOT
crate=$CRATE_ROOT
crate_glob="${crate#"$root/"}/**"

if [[ "$crate" = */tests/* || "$crate" = *test-utils* ]]; then
exit 0
fi

command=(git cliff --workdir "$root" --config "$root/cliff.toml" "${@}")
run_unless_dry_run "${command[@]}" --output "$root/CHANGELOG.md"
if [ -n "$crate" ] && [ "$root" != "$crate" ]; then
run_unless_dry_run "${command[@]}" --include-path "$crate_glob" --output "$crate/CHANGELOG.md"
fi
24 changes: 24 additions & 0 deletions scripts/check_no_std.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -eo pipefail

no_std_packages=(
alloy-eips
alloy-genesis
alloy-serde
alloy-consensus
)

for package in "${no_std_packages[@]}"; do
cmd="cargo +stable build -p $package --target riscv32imac-unknown-none-elf --no-default-features"
if [ -n "$CI" ]; then
echo "::group::$cmd"
else
printf "\n%s:\n %s\n" "$package" "$cmd"
fi

$cmd

if [ -n "$CI" ]; then
echo "::endgroup::"
fi
done

0 comments on commit 6dd27ac

Please sign in to comment.