@@ -19,30 +19,36 @@ function show_help() {
19
19
echo " ./scripts/verify-pallets-build.sh Exit with code 0 if pallets code is well decoupled from the other code in the repo"
20
20
echo " Options:"
21
21
echo " --no-revert Leaves only runtime code on exit"
22
+ echo " --ignore-git-state Ignores git actual state"
22
23
exit 1
23
24
}
24
25
25
26
# parse CLI args
26
27
NO_REVERT=
28
+ IGNORE_GIT_STATE=
27
29
for i in " $@ "
28
30
do
29
31
case $i in
30
32
--no-revert)
31
33
NO_REVERT=true
32
34
shift
33
35
;;
36
+ --ignore-git-state)
37
+ IGNORE_GIT_STATE=true
38
+ shift
39
+ ;;
34
40
* )
35
41
show_help " Unknown option: $i "
36
42
;;
37
43
esac
38
44
done
39
45
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; }
42
48
43
49
# let's avoid any restrictions on where this script can be called for - bridges repo may be
44
50
# 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.
46
52
BRIDGES_FOLDER=" $( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd ) /.."
47
53
48
54
# let's leave repository/subtree in its original (clean) state if something fails below
@@ -58,6 +64,7 @@ rm -rf $BRIDGES_FOLDER/.maintain
58
64
rm -rf $BRIDGES_FOLDER /bin/millau
59
65
rm -rf $BRIDGES_FOLDER /bin/rialto
60
66
rm -rf $BRIDGES_FOLDER /bin/rialto-parachain
67
+ rm -rf $BRIDGES_FOLDER /bin/.keep
61
68
rm -rf $BRIDGES_FOLDER /deployments
62
69
rm -rf $BRIDGES_FOLDER /fuzz
63
70
rm -rf $BRIDGES_FOLDER /modules/beefy
@@ -68,6 +75,16 @@ rm -rf $BRIDGES_FOLDER/primitives/chain-rialto
68
75
rm -rf $BRIDGES_FOLDER /primitives/chain-rialto-parachain
69
76
rm -rf $BRIDGES_FOLDER /primitives/chain-westend
70
77
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
71
88
rm -rf $BRIDGES_FOLDER /tools
72
89
rm -f $BRIDGES_FOLDER /.dockerignore
73
90
rm -f $BRIDGES_FOLDER /.gitlab-ci.yml
0 commit comments