Skip to content

Commit 7a8b825

Browse files
authored
Merge pull request #13640 from rmcdermo/master
Build: only checkout versions if they exist in repo
2 parents 5d609e5 + 7d8da5a commit 7a8b825

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

Build/Scripts/HYPRE/build_hypre.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,20 @@ echo "Checking for hypre repository..."
2929

3030
if [ -d "$FIREMODELS/hypre" ]; then
3131
echo "Hypre repository exists. Building hypre library."
32+
cd $FIREMODELS/hypre
33+
if [[ "$(git tag -l "v2.32.0")" == "v2.32.0" ]]; then
34+
echo "Checking out v2.32.0"
35+
$(git checkout v2.32.0)
36+
fi
3237
cd $FIREMODELS/hypre/src
3338
export HYPRE_VERSION=$(git describe)
3439
echo "Cleaning hypre repository..."
3540
make distclean
3641
cp $FIREMODELS/fds/Build/Scripts/HYPRE/$CONFMAKE .
3742
./$CONFMAKE
43+
# get back from detached HEAD state
44+
cd $FIREMODELS/hypre
45+
$(git checkout master)
3846
cd $dir
3947
export HYPRE_HOME=$FIREMODELS/libs/hypre/$HYPRE_VERSION
4048
echo "Hypre library:" $FIREMODELS/libs/hypre/$HYPRE_VERSION

Build/Scripts/SUNDIALS/build_sundials.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,23 @@ echo "Checking for sundials repository..."
3030

3131
if [ -d "$FIREMODELS/sundials" ]; then
3232
echo "Sundials repository exists. Building sundials library."
33-
echo "Checking out version 6.7.0"
3433
cd $FIREMODELS/sundials
35-
$(git checkout v6.7.0)
36-
34+
if [[ "$(git tag -l "v6.7.0")" == "v6.7.0" ]]; then
35+
echo "Checking out v6.7.0"
36+
$(git checkout v6.7.0)
37+
fi
3738
mkdir $FIREMODELS/sundials/BUILDDIR
3839
cd $FIREMODELS/sundials/BUILDDIR
39-
4040
echo "Creating library directry..."
4141
export SUNDIALS_VERSION=$(git describe)
4242
mkdir $FIREMODELS/libs/sundials/$SUNDIALS_VERSION
43-
4443
echo "Cleaning sundials repository..."
4544
rm -r $FIREMODELS/sundials/BUILDDIR/*
4645
cp $FIREMODELS/fds/Build/Scripts/SUNDIALS/$CONFMAKE .
4746
./$CONFMAKE
48-
4947
# get back from detached HEAD state
5048
cd $FIREMODELS/sundials
5149
$(git checkout main)
52-
5350
cd $dir
5451
export SUNDIALS_HOME=$FIREMODELS/libs/sundials/$SUNDIALS_VERSION
5552
echo "Sundials library:" $FIREMODELS/libs/sundials/$SUNDIALS_VERSION

0 commit comments

Comments
 (0)