aboutsummaryrefslogtreecommitdiff
path: root/test/lint
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2020-03-05 16:33:30 +0100
committerWladimir J. van der Laan <laanwj@protonmail.com>2020-03-05 16:33:54 +0100
commita2a77ba34f713d6406c31a4baa991666b13794a0 (patch)
tree1965d3101b3196cdac7b55419eb9ab546b5e45ea /test/lint
parentd0601e67f151a753bc71e41e5a5c56a3fa09c1f1 (diff)
parent2a95c7c95690112a03b14ccb0fb8f66db12cb75b (diff)
Merge #18056: ci: Check for submodules
2a95c7c95690112a03b14ccb0fb8f66db12cb75b ci: Check for submodules (Emil Engler) Pull request description: See #18019. The current solution looks like this (I also tested with multiple submodules): ``` These submodules were found, delete them: 355a5a310019659d9bf6818d2fd66fbb214dfed7 curl (curl-7_68_0-108-g355a5a310) ``` The submodule example command was `git submodule add https://github.com/curl/curl.git curl` ACKs for top commit: laanwj: ACK 2a95c7c95690112a03b14ccb0fb8f66db12cb75b Tree-SHA512: 64bf388123f0a88d12e3e41ff29bc190339377a0615c35dc3f2700bb7773470a8fa426e0ff57188a60ed88bded39f75082ff0b73118651ff403b163422395005
Diffstat (limited to 'test/lint')
-rwxr-xr-xtest/lint/lint-submodule.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/lint/lint-submodule.sh b/test/lint/lint-submodule.sh
new file mode 100755
index 0000000000..d9aa021df7
--- /dev/null
+++ b/test/lint/lint-submodule.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2020 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#
+# This script checks for git modules
+export LC_ALL=C
+EXIT_CODE=0
+
+CMD=$(git submodule status --recursive)
+if test -n "$CMD";
+then
+ echo These submodules were found, delete them:
+ echo "$CMD"
+ EXIT_CODE=1
+fi
+
+exit $EXIT_CODE
+