Skip to content

Commit

Permalink
Bump LEAF version from 3.0.18 to 3.0.19
Browse files Browse the repository at this point in the history
  • Loading branch information
jefferya committed Dec 20, 2024
1 parent b284607 commit 5f2fbfa
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 43 deletions.
2 changes: 1 addition & 1 deletion docker-bake-leaf-version-override.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"variable": {
"LEAF_VERSION": {
"default": "3.0.18"
"default": "3.0.19"
}
}
}
9 changes: 5 additions & 4 deletions docker/drupal/rootfs/var/www/drupal/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
_core:
default_config_hash: R4IF-ClDHXxblLcG0L7MgsLvfBIMAvi_skumNFQwkDc
module:
getjwtonlogin: 0
islandora_bagger_integration: 0
action: 0
addtoany: 0
admin_toolbar: 0
Expand Down Expand Up @@ -80,7 +80,6 @@ module:
fontawesome: 0
form_options_attributes: 0
geolocation: 0
getjwtonlogin: 0
gnode: 0
gprofile: 0
group: 0
Expand All @@ -93,7 +92,6 @@ module:
inline_entity_form: 0
islandora: 0
islandora_audio: 0
islandora_bagger_integration: 0
islandora_breadcrumbs: 0
islandora_core_feature: 0
islandora_fits: 0
Expand Down Expand Up @@ -223,6 +221,8 @@ module:
views: 10
paragraphs: 11
minimal: 1000
_core:
default_config_hash: R4IF-ClDHXxblLcG0L7MgsLvfBIMAvi_skumNFQwkDc
theme:
bootstrap_barrio: 0
seven: 0
Expand Down
73 changes: 39 additions & 34 deletions docker/drupal/scripts/auto.sh
Original file line number Diff line number Diff line change
@@ -1,37 +1,3 @@

BRANCH=$(git branch --show-current)
if [ "${BRANCH}" != 'main' ]; then
echo "Not on the main branch: ${BRANCH}"
# git switch main && git pull
exit 1
fi

# Get local LEAF version
LEAF_VERSION_LOCAL=$(jq -r '.variable.LEAF_VERSION.default' docker-bake-leaf-version-override.json)
echo "LOCAL LEAF: ${LEAF_VERSION_LOCAL}"

# Get remote LEAF tag
LEAF_VERSION=$(
git ls-remote --tags https://gitlab.com/calincs/cwrc/leaf/leaf-base-i8.git | \
awk -F/ '{print $NF}' | \
grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+$' | \
sort -V | \
tail -n1
)
echo "Remote LEAF: ${LEAF_VERSION}"

# Test if LEAF version update needed
if [ "${LEAF_VERSION_LOCAL}" = "${LEAF_VERSION}" ]; then
echo "Version up-to-date ${LEAF_VERSION_LOCAL}"
exit 2
else
echo "Starting LEAF version update from ${LEAF_VERSION_LOCAL} to ${LEAF_VERSION}"
git checkout -b "leaf_update_${LEAF_VERSION}"
update_leaf_version_test ${LEAF_VERSION}
update_leaf_version ${LEAF_VERSION}
git commit -a -m "Bump LEAF version from ${LEAF_VERSION_LOCAL} to ${LEAF_VERSION}" && git push
fi

#
function update_leaf_version_test() {
echo $1
Expand Down Expand Up @@ -67,3 +33,42 @@ function update_leaf_version() {
docker cp $id:/var/www/drupal/composer.lock docker/drupal/rootfs/var/www/drupal/
docker rm -v $id
}



BRANCH=$(git branch --show-current)
if [ "${BRANCH}" != 'main' ]; then
echo "Not on the main branch: ${BRANCH}"
# git switch main && git pull
exit 1
fi

# Get local LEAF version
LEAF_VERSION_LOCAL=$(jq -r '.variable.LEAF_VERSION.default' docker-bake-leaf-version-override.json)
echo "LOCAL LEAF: ${LEAF_VERSION_LOCAL}"

# Get remote LEAF tag
LEAF_VERSION=$(
git ls-remote --tags https://gitlab.com/calincs/cwrc/leaf/leaf-base-i8.git | \
awk -F/ '{print $NF}' | \
grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+$' | \
sort -V | \
tail -n1
)
echo "Remote LEAF: ${LEAF_VERSION}"

# Test if LEAF version update needed
if [ "${LEAF_VERSION_LOCAL}" = "${LEAF_VERSION}" ]; then
echo "Version up-to-date ${LEAF_VERSION_LOCAL}"
exit 2
elif [ -z "${LEAF_VERSION_LOCAL}" ]; then
echo "LEAF_VERSION_LOCAL missing; check if jq is installed or in the wrong (non-root directory)"
exit 2
else
echo "Starting LEAF version update from ${LEAF_VERSION_LOCAL} to ${LEAF_VERSION}"
git checkout -b "leaf_update_${LEAF_VERSION}"
update_leaf_version_test ${LEAF_VERSION}
update_leaf_version ${LEAF_VERSION}
git commit -a -m "Bump LEAF version from ${LEAF_VERSION_LOCAL} to ${LEAF_VERSION}" && git push
fi

0 comments on commit 5f2fbfa

Please sign in to comment.