From 7c9897e0f00535fb49d0e53b288bd270af22bc69 Mon Sep 17 00:00:00 2001 From: soederqvist_a Date: Tue, 2 Sep 2025 15:37:43 +0200 Subject: [PATCH] add motor deprecated and improvements --- .gitignore | 1 + build.sh | 33 +++++++++++++++++---------------- modules/autosave.yaml | 4 ++++ modules/motorDeprecated.yaml | 4 ++++ modules/motorSim.yaml | 3 ++- 5 files changed, 28 insertions(+), 17 deletions(-) create mode 100644 .gitignore create mode 100644 modules/autosave.yaml create mode 100644 modules/motorDeprecated.yaml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6aa2721 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +workdir diff --git a/build.sh b/build.sh index 6f0dc90..5041a74 100755 --- a/build.sh +++ b/build.sh @@ -14,25 +14,26 @@ fi module=$(yq e '.module' $MODULEYAML) repo=$(yq e '.repo' $MODULEYAML) -tag=$(yq e '.tag' $MODULEYAML) +branch=$(yq e '.branch' $MODULEYAML) +commit=$(yq e '.commit' $MODULEYAML) + +if [ -z "$commit" ]; then + echo "Error no tag or commit specified" + exit -1 +fi + +# branch can be omitted if it's a tag or commit on default branch +if [ ! -z "$branch" ]; then + branch_arg="-b $branch" +fi builddir="$WORKDIR/$module" if [ ! -d "${builddir}" ]; then - echo je - if [ ! "$tag" = "null" ]; then - # prioritize tags - git clone $repo $builddir -b $tag - else - # use commit - branch=$(yq e '.branch' $MODULEYAML) - commit=$(yq e '.commit' $MODULEYAML) - if [ -z "$commit" ]; then - echo "Error no tag or commit specified" - exit -1 - fi - git clone $repo $builddir -b $branch - git -C $builddir checkout $commit - fi + git clone $repo $builddir $branch_arg +else + git -C $builddir fetch origin $branch + git -C $builddir fetch --tags + git -C $builddir checkout $commit fi ARCH_FILTER="RHEL8%" make -C $builddir $2 diff --git a/modules/autosave.yaml b/modules/autosave.yaml new file mode 100644 index 0000000..bd3d70a --- /dev/null +++ b/modules/autosave.yaml @@ -0,0 +1,4 @@ +module: autosave +repo: git@git.psi.ch:epics_driver_modules/autosave.git +branch: master +tag: 5.7.18 diff --git a/modules/motorDeprecated.yaml b/modules/motorDeprecated.yaml new file mode 100644 index 0000000..49be863 --- /dev/null +++ b/modules/motorDeprecated.yaml @@ -0,0 +1,4 @@ +module: motorDeprecated +repo: git@gitea.psi.ch:lin-epics-modules/motorDeprecated.git +branch: main +commit: 0.1.2 diff --git a/modules/motorSim.yaml b/modules/motorSim.yaml index 334df49..a28075d 100644 --- a/modules/motorSim.yaml +++ b/modules/motorSim.yaml @@ -1,3 +1,4 @@ module: motorSim repo: git@git.psi.ch:epics_driver_modules/motorMotorSim.git -tag: 1.2.0 +branch: master +commit: 1.2.0