File tree 3 files changed +21
-21
lines changed
3 files changed +21
-21
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ repo=$1
4
+ core_version=$2
5
+
6
+ # Add "-SNAPSHOT" to powsybl-core version if not already there
7
+ core_snapshot_version=$( echo " $core_version " | grep -q SNAPSHOT && echo " $core_version " || echo " $core_version -SNAPSHOT" )
8
+
9
+ # Find if a CI snapshot branch exists
10
+ SNAPSHOT_BRANCH=$( git ls-remote --heads " $repo " | grep -E " refs/heads/ci/core-$core_snapshot_version " | sed ' s/.*refs\/heads\///' )
11
+ if [ -n " $SNAPSHOT_BRANCH " ]; then
12
+ echo " SNAPSHOT VERSION EXIST: $SNAPSHOT_BRANCH "
13
+ echo " SNAPSHOT_BRANCH=$SNAPSHOT_BRANCH " >> " $GITHUB_ENV "
14
+ else
15
+ echo " No SNAPSHOT branch found"
16
+ echo " SNAPSHOT_BRANCH=main" >> " $GITHUB_ENV "
17
+ fi
Original file line number Diff line number Diff line change 56
56
working-directory : ./powsybl-core
57
57
58
58
# Checkout script
59
- # The script check_integration_branch .sh is located in the workflow folder of the repository
59
+ # The script check_snapshot_branch .sh is located in the workflow folder of the repository
60
60
# It is necessary for checking out the integration branch if it exists
61
61
- name : Checkout script
62
62
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -68,13 +68,13 @@ jobs:
68
68
69
69
# Build powsybl-metrix
70
70
- name : Checking for powsybl-metrix snapshot branch
71
- run : ${{ env.SCRIPTS_PATH }}/check_integration_branch .sh "https://github.com/powsybl/powsybl-metrix.git" ${{ env.CORE_VERSION }}
71
+ run : ${{ env.SCRIPTS_PATH }}/check_snapshot_branch .sh "https://github.com/powsybl/powsybl-metrix.git" ${{ env.CORE_VERSION }}
72
72
73
73
- name : Checkout powsybl-metrix
74
74
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
75
75
with :
76
76
repository : powsybl/powsybl-metrix
77
- ref : ${{ env.INTEGRATION_BRANCH }}
77
+ ref : ${{ env.SNAPSHOT_BRANCH }}
78
78
path : powsybl-metrix
79
79
submodules : true
80
80
@@ -164,7 +164,7 @@ jobs:
164
164
165
165
outputs :
166
166
core-version : ${{ env.CORE_VERSION }}
167
- metrix-branch : ${{ env.INTEGRATION_BRANCH }}
167
+ metrix-branch : ${{ env.SNAPSHOT_BRANCH }}
168
168
169
169
# Slack notification on failure
170
170
notify_slack :
You can’t perform that action at this time.
0 commit comments