Skip to content

Commit 4c4a7ea

Browse files
authored
Small stuff from Cumulus integration (#1865)
1 parent b39cb0d commit 4c4a7ea

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

scripts/verify-pallets-build.sh

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,36 @@ function show_help() {
1919
echo " ./scripts/verify-pallets-build.sh Exit with code 0 if pallets code is well decoupled from the other code in the repo"
2020
echo "Options:"
2121
echo " --no-revert Leaves only runtime code on exit"
22+
echo " --ignore-git-state Ignores git actual state"
2223
exit 1
2324
}
2425

2526
# parse CLI args
2627
NO_REVERT=
28+
IGNORE_GIT_STATE=
2729
for i in "$@"
2830
do
2931
case $i in
3032
--no-revert)
3133
NO_REVERT=true
3234
shift
3335
;;
36+
--ignore-git-state)
37+
IGNORE_GIT_STATE=true
38+
shift
39+
;;
3440
*)
3541
show_help "Unknown option: $i"
3642
;;
3743
esac
3844
done
3945

40-
# the script is able to work only on clean git copy
41-
[[ -z "$(git status --porcelain)" ]] || { echo >&2 "The git copy must be clean"; exit 1; }
46+
# the script is able to work only on clean git copy, unless we want to ignore this check
47+
[[ ! -z "${IGNORE_GIT_STATE}" ]] || [[ -z "$(git status --porcelain)" ]] || { echo >&2 "The git copy must be clean"; exit 1; }
4248

4349
# let's avoid any restrictions on where this script can be called for - bridges repo may be
4450
# plugged into any other repo folder. So the script (and other stuff that needs to be removed)
45-
# may be located either in call dir, or one of it subdirs.
51+
# may be located either in call dir, or one of it subdirs.
4652
BRIDGES_FOLDER="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/.."
4753

4854
# let's leave repository/subtree in its original (clean) state if something fails below
@@ -58,6 +64,7 @@ rm -rf $BRIDGES_FOLDER/.maintain
5864
rm -rf $BRIDGES_FOLDER/bin/millau
5965
rm -rf $BRIDGES_FOLDER/bin/rialto
6066
rm -rf $BRIDGES_FOLDER/bin/rialto-parachain
67+
rm -rf $BRIDGES_FOLDER/bin/.keep
6168
rm -rf $BRIDGES_FOLDER/deployments
6269
rm -rf $BRIDGES_FOLDER/fuzz
6370
rm -rf $BRIDGES_FOLDER/modules/beefy
@@ -68,6 +75,16 @@ rm -rf $BRIDGES_FOLDER/primitives/chain-rialto
6875
rm -rf $BRIDGES_FOLDER/primitives/chain-rialto-parachain
6976
rm -rf $BRIDGES_FOLDER/primitives/chain-westend
7077
rm -rf $BRIDGES_FOLDER/relays
78+
rm -rf $BRIDGES_FOLDER/scripts/add_license.sh
79+
rm -rf $BRIDGES_FOLDER/scripts/build-containers.sh
80+
rm -rf $BRIDGES_FOLDER/scripts/ci-cache.sh
81+
rm -rf $BRIDGES_FOLDER/scripts/dump-logs.sh
82+
rm -rf $BRIDGES_FOLDER/scripts/license_header
83+
rm -rf $BRIDGES_FOLDER/scripts/send-message-from-millau-rialto.sh
84+
rm -rf $BRIDGES_FOLDER/scripts/send-message-from-rialto-millau.sh
85+
rm -rf $BRIDGES_FOLDER/scripts/update-weights.sh
86+
rm -rf $BRIDGES_FOLDER/scripts/update-weights-setup.sh
87+
rm -rf $BRIDGES_FOLDER/scripts/update_substrate.sh
7188
rm -rf $BRIDGES_FOLDER/tools
7289
rm -f $BRIDGES_FOLDER/.dockerignore
7390
rm -f $BRIDGES_FOLDER/.gitlab-ci.yml

0 commit comments

Comments
 (0)