From 9cb858d10a0ceea41410ed34e6518c3f925f28cb Mon Sep 17 00:00:00 2001
From: Johannes Junggeburth <johannes.josef.junggeburth@cern.ch>
Date: Sat, 9 Mar 2024 10:04:39 +0100
Subject: [PATCH] Rebase GeoModel always w.r.t main in the pipeline

---
 athena_ci/athena_build.sh           | 19 ++++++++++++++++++-
 athena_ci/patch_package_filters.txt |  1 +
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/athena_ci/athena_build.sh b/athena_ci/athena_build.sh
index 4260f51bc..ac20f4fc4 100755
--- a/athena_ci/athena_build.sh
+++ b/athena_ci/athena_build.sh
@@ -34,6 +34,8 @@ function heading() {
 
 set -e
 
+BUILD_DIR=${PWD}
+
 heading "Preliminary setup"
 
 if [ -z "${ATHENA_SOURCE}" ]; then
@@ -94,10 +96,25 @@ lsetup "views ${LCG_RELEASE} ${LCG_PLATFORM}" || true
 CCACHE=$(command -v ccache)
 $CCACHE -z
 
+heading "Rebase the GeoModel code base w.r.t. main"
+
+cd ${CI_PROJECT_DIR}
+git fetch origin
+
+fill_line "Changes w.r.t to main before rebase"
+
+git diff HEAD origin/main
+git rebase origin/main
+fill_line "Changes w.r.t to main after rebase"
+
+git diff HEAD origin/main
+
+
+cd ${BUILD_DIR}
+
 heading "Configure GeoModel"
 
 gm_install_dir=$PWD/geomodel-install
-
 cmake -S "${SCRIPT_DIR}/.." -B geomodel-build \
   -GNinja \
   -DCMAKE_MAKE_PROGRAM="$NINJA" \
diff --git a/athena_ci/patch_package_filters.txt b/athena_ci/patch_package_filters.txt
index b9fc84ffa..64185b44e 100644
--- a/athena_ci/patch_package_filters.txt
+++ b/athena_ci/patch_package_filters.txt
@@ -10,4 +10,5 @@
 + InnerDetector/InDetDetDescr/ServiceExtensionGeoModelXml	
 + InnerDetector/InDetDetDescr/StripGeoModelXml	
 + InnerDetector/InDetDetDescr/PLRGeoModelXml
++ InnerDetector/InDetDetDescr/PixelGeoModel
  
-- 
GitLab