Skip to content

Commit

Permalink
added option for pulling gitman submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
klaxalk committed Mar 25, 2024
1 parent 150ccaa commit 2cbeb92
Show file tree
Hide file tree
Showing 9 changed files with 103 additions and 13 deletions.
7 changes: 5 additions & 2 deletions .ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,15 @@ echo "$REPOS" | while IFS= read -r REPO; do
PACKAGE=$(echo "$REPO" | awk '{print $1}')
URL=$(echo "$REPO" | awk '{print $2}')
BRANCH=$(echo "$REPO" | awk '{print $3}')
GITMAN=$(echo "$REPO" | awk '{print $4}')

echo "$0: cloning '$URL --depth 1 --branch $BRANCH' into '$PACKAGE'"
git clone $URL --recurse-submodules --shallow-submodules --depth 1 --branch $BRANCH $PACKAGE

cd $PACKAGE
[[ -e .gitman.yml || -e .gitman.yaml ]] && gitman install
if [[ "$GITMAN" != "True" ]]; then
cd $PACKAGE
[[ -e .gitman.yml || -e .gitman.yaml ]] && gitman install
fi

cd $WORKSPACE/src

Expand Down
7 changes: 5 additions & 2 deletions .ci/build_for_testing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ echo "$FULL_COVERAGE_REPOS" | while IFS= read -r REPO; do
URL=$(echo "$REPO" | awk '{print $2}')
TEST=$(echo "$REPO" | awk '{print $6}')
FULL_COVERAGE=$(echo "$REPO" | awk '{print $7}')
GITMAN=$(echo "$REPO" | awk '{print $8}')

if [[ "$VARIANT" == "stable" ]]; then
BRANCH=$(echo "$REPO" | awk '{print $3}')
Expand All @@ -78,8 +79,10 @@ echo "$FULL_COVERAGE_REPOS" | while IFS= read -r REPO; do
echo "$0: cloning '$URL --depth 1 --branch $BRANCH' into '$PACKAGE'"
git clone $URL --recurse-submodules --shallow-submodules --depth 1 --branch $BRANCH $PACKAGE

cd $PACKAGE
[[ -e .gitman.yml || -e .gitman.yaml ]] && gitman install
if [[ "$GITMAN" != "True" ]]; then
cd $PACKAGE
[[ -e .gitman.yml || -e .gitman.yaml ]] && gitman install
fi

done

Expand Down
5 changes: 4 additions & 1 deletion .ci/build_nonbloom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@ cd $WORK_DIR
PACKAGE=$(echo "$REPO" | awk '{print $1}')
URL=$(echo "$REPO" | awk '{print $2}')
BRANCH=$(echo "$REPO" | awk '{print $3}')
GITMAN=$(echo "$REPO" | awk '{print $4}')

echo "$0: cloning '$URL --depth 1 --branch $BRANCH' into '$PACKAGE'"
git clone $URL --recurse-submodules --branch $BRANCH $PACKAGE

cd $WORK_DIR/$PACKAGE/

[[ -e .gitman.yml || -e .gitman.yaml ]] && gitman install
if [[ "$GITMAN" != "True" ]]; then
[[ -e .gitman.yml || -e .gitman.yaml ]] && gitman install
fi

cp -r $MY_PATH/../.ci_scripts ./

Expand Down
13 changes: 9 additions & 4 deletions .ci/get_repo_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,18 @@ def main():
refs = properties['git_refs']

if variant == "stable":
ref = refs['stable']
ref = refs['stable']
elif variant == "unstable":
ref = refs['unstable']
ref = refs['unstable']
else:
ref = refs['testing']
ref = refs['testing']

print("{} {} {}".format(repo_name, url, ref))
try:
gitman = bool(properties['gitman'])
except:
pass

print("{} {} {} {}".format(repo_name, url, ref, gitman))

if __name__ == '__main__':
main()
7 changes: 6 additions & 1 deletion .ci/parse_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ def main():
except:
pass

print("{} {} {} {} {} {} {}".format(package, url, stable_ref, testing_ref, unstable_ref, ros_test_enabled, full_coverage))
try:
gitman = bool(properties['gitman'])
except:
pass

print("{} {} {} {} {} {} {} {}".format(package, url, stable_ref, testing_ref, unstable_ref, ros_test_enabled, full_coverage, gitman))

if __name__ == '__main__':
main()
7 changes: 5 additions & 2 deletions .ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,15 @@ echo "$THIS_TEST_REPOS" | while IFS= read -r REPO; do
PACKAGE=$(echo "$REPO" | awk '{print $1}')
URL=$(echo "$REPO" | awk '{print $2}')
BRANCH=$(echo "$REPO" | awk '{print $3}')
GITMAN=$(echo "$REPO" | awk '{print $4}')

[ ! -e ${PACKAGE} ] && echo "$0: cloning '$URL --depth 1 --branch $BRANCH' into '$PACKAGE'" || echo "$0: not cloning, already there"
[ ! -e ${PACKAGE} ] && git clone $URL --recurse-submodules --shallow-submodules --depth 1 --branch $BRANCH $PACKAGE || echo "$0: not cloning, already there"

cd $PACKAGE
[[ -e .gitman.yml || -e .gitman.yaml ]] && gitman install || echo "no gitman modules to install"
if [[ "$GITMAN" != "True" ]]; then
cd $PACKAGE
[[ -e .gitman.yml || -e .gitman.yaml ]] && gitman install || echo "no gitman modules to install"
fi

done

Expand Down
Loading

0 comments on commit 2cbeb92

Please sign in to comment.