@@ -107,7 +107,6 @@ jobs:
107107 - name : Set PHP common variables
108108 id : set-common-data
109109 run : |
110- echo "major_tag=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/${{env.PHP_COMMON_REPO}}/releases/latest | grep -oP "\/tag\/v\K(.*)$" | cut -d. -f1)" >> $GITHUB_OUTPUT
111110 echo "branch=${{ fromJson(env.PHP_COMMON_JSON)[0] }}" >> $GITHUB_OUTPUT
112111 if [ "${{ inputs.is_call }}" = "true" ]; then
113112 echo "repo=${{env.PHP_COMMON_REPO}}" >> $GITHUB_OUTPUT
@@ -118,7 +117,6 @@ jobs:
118117 - name : Set LAPI client variables
119118 id : set-lapi-client-data
120119 run : |
121- echo "major_tag=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/${{env.LAPI_CLIENT_REPO}}/releases/latest | grep -oP "\/tag\/v\K(.*)$" | cut -d. -f1)" >> $GITHUB_OUTPUT
122120 echo "branch=${{ fromJson(env.LAPI_CLIENT_JSON)[0] }}" >> $GITHUB_OUTPUT
123121 if [ "${{ inputs.is_call }}" = "true" ]; then
124122 echo "repo=${{env.LAPI_CLIENT_REPO}}" >> $GITHUB_OUTPUT
@@ -128,7 +126,6 @@ jobs:
128126 - name : Set CAPI client variables
129127 id : set-capi-client-data
130128 run : |
131- echo "major_tag=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/${{env.CAPI_CLIENT_REPO}}/releases/latest | grep -oP "\/tag\/v\K(.*)$" | cut -d. -f1)" >> $GITHUB_OUTPUT
132129 echo "branch=${{ fromJson(env.CAPI_CLIENT_JSON)[0] }}" >> $GITHUB_OUTPUT
133130 if [ "${{ inputs.is_call }}" = "true" ]; then
134131 echo "repo=${{env.CAPI_CLIENT_REPO}}" >> $GITHUB_OUTPUT
@@ -139,7 +136,6 @@ jobs:
139136 - name : Set Remediation engine variables
140137 id : set-remediation-engine-data
141138 run : |
142- echo "major_tag=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/${{env.REMEDIATION_ENGINE_REPO}}/releases/latest | grep -oP "\/tag\/v\K(.*)$" | cut -d. -f1)" >> $GITHUB_OUTPUT
143139 echo "branch=${{ fromJson(env.REMEDIATION_ENGINE_JSON)[0] }}" >> $GITHUB_OUTPUT
144140 if [ "${{ inputs.is_call }}" = "true" ]; then
145141 echo "repo=${{env.REMEDIATION_ENGINE_REPO}}" >> $GITHUB_OUTPUT
@@ -150,7 +146,6 @@ jobs:
150146 - name : Set Bouncer library variables
151147 id : set-bouncer-lib-data
152148 run : |
153- echo "major_tag=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/${{env.BOUNCER_LIB_REPO}}/releases/latest | grep -oP "\/tag\/v\K(.*)$" | cut -d. -f1)" >> $GITHUB_OUTPUT
154149 echo "branch=${{ fromJson(env.BOUNCER_LIB_JSON)[0] }}" >> $GITHUB_OUTPUT
155150 if [ "${{ inputs.is_call }}" = "true" ]; then
156151 echo "repo=${{env.BOUNCER_LIB_REPO}}" >> $GITHUB_OUTPUT
@@ -274,24 +269,24 @@ jobs:
274269 - name : Modify dependencies to use development aliases
275270 run : |
276271 # Standalone bouncer
277- composer require crowdsec/bouncer:"dev-${{ steps.set-bouncer-lib-data.outputs.branch }} as ${{ steps.set-bouncer-lib-data.outputs.major_tag }} .999.0" --no-update --working-dir ./${{env.EXTENSION_PATH}}
278- composer require crowdsec/common:"dev-${{ steps.set-common-data.outputs.branch }} as ${{ steps.set-common-data.outputs.major_tag }} .999.0" --no-update --working-dir ./${{env.EXTENSION_PATH}}
279- composer require crowdsec/lapi-client:"dev-${{ steps.set-lapi-client-data.outputs.branch }} as ${{ steps.set-lapi-client-data.outputs.major_tag }} .999.0" --no-update --working-dir ./${{env.EXTENSION_PATH}}
280- composer require crowdsec/remediation-engine:"dev-${{ steps.set-remediation-engine-data.outputs.branch }} as ${{ steps.set-remediation-engine-data.outputs.major_tag }} .999.0" --no-update --working-dir ./${{env.EXTENSION_PATH}}
281- composer require crowdsec/capi-client:"dev-${{ steps.set-capi-client-data.outputs.branch }} as ${{ steps.set-capi-client-data.outputs.major_tag }} .999.0" --no-update --working-dir ./${{env.EXTENSION_PATH}}
272+ composer require crowdsec/bouncer:"dev-${{ steps.set-bouncer-lib-data.outputs.branch }} as 999 .999.0" --no-update --working-dir ./${{env.EXTENSION_PATH}}
273+ composer require crowdsec/common:"dev-${{ steps.set-common-data.outputs.branch }} as 999 .999.0" --no-update --working-dir ./${{env.EXTENSION_PATH}}
274+ composer require crowdsec/lapi-client:"dev-${{ steps.set-lapi-client-data.outputs.branch }} as 999 .999.0" --no-update --working-dir ./${{env.EXTENSION_PATH}}
275+ composer require crowdsec/remediation-engine:"dev-${{ steps.set-remediation-engine-data.outputs.branch }} as 999 .999.0" --no-update --working-dir ./${{env.EXTENSION_PATH}}
276+ composer require crowdsec/capi-client:"dev-${{ steps.set-capi-client-data.outputs.branch }} as 999 .999.0" --no-update --working-dir ./${{env.EXTENSION_PATH}}
282277 # Bouncer lib
283- composer require crowdsec/common:"dev-${{ steps.set-common-data.outputs.branch }} as ${{ steps.set-common-data.outputs.major_tag }} .999.0" --no-update --working-dir ./${{env.BOUNCER_LIB_PATH}}
284- composer require crowdsec/lapi-client:"dev-${{ steps.set-lapi-client-data.outputs.branch }} as ${{ steps.set-lapi-client-data.outputs.major_tag }} .999.0" --no-update --working-dir ./${{env.BOUNCER_LIB_PATH}}
285- composer require crowdsec/remediation-engine:"dev-${{ steps.set-remediation-engine-data.outputs.branch }} as ${{ steps.set-remediation-engine-data.outputs.major_tag }} .999.0" --no-update --working-dir ./${{env.BOUNCER_LIB_PATH}}
286- composer require crowdsec/capi-client:"dev-${{ steps.set-capi-client-data.outputs.branch }} as ${{ steps.set-capi-client-data.outputs.major_tag }} .999.0" --no-update --working-dir ./${{env.BOUNCER_LIB_PATH}}
278+ composer require crowdsec/common:"dev-${{ steps.set-common-data.outputs.branch }} as 999 .999.0" --no-update --working-dir ./${{env.BOUNCER_LIB_PATH}}
279+ composer require crowdsec/lapi-client:"dev-${{ steps.set-lapi-client-data.outputs.branch }} as 999 .999.0" --no-update --working-dir ./${{env.BOUNCER_LIB_PATH}}
280+ composer require crowdsec/remediation-engine:"dev-${{ steps.set-remediation-engine-data.outputs.branch }} as 999 .999.0" --no-update --working-dir ./${{env.BOUNCER_LIB_PATH}}
281+ composer require crowdsec/capi-client:"dev-${{ steps.set-capi-client-data.outputs.branch }} as 999 .999.0" --no-update --working-dir ./${{env.BOUNCER_LIB_PATH}}
287282 # Remediation engine
288- composer require crowdsec/common:"dev-${{ steps.set-common-data.outputs.branch }} as ${{ steps.set-common-data.outputs.major_tag }} .999.0" --no-update --working-dir ./${{env.REMEDIATION_ENGINE_PATH}}
289- composer require crowdsec/lapi-client:"dev-${{ steps.set-lapi-client-data.outputs.branch }} as ${{ steps.set-lapi-client-data.outputs.major_tag }} .999.0" --no-update --working-dir ./${{env.REMEDIATION_ENGINE_PATH}}
290- composer require crowdsec/capi-client:"dev-${{ steps.set-capi-client-data.outputs.branch }} as ${{ steps.set-capi-client-data.outputs.major_tag }} .999.0" --no-update --working-dir ./${{env.REMEDIATION_ENGINE_PATH}}
283+ composer require crowdsec/common:"dev-${{ steps.set-common-data.outputs.branch }} as 999 .999.0" --no-update --working-dir ./${{env.REMEDIATION_ENGINE_PATH}}
284+ composer require crowdsec/lapi-client:"dev-${{ steps.set-lapi-client-data.outputs.branch }} as 999 .999.0" --no-update --working-dir ./${{env.REMEDIATION_ENGINE_PATH}}
285+ composer require crowdsec/capi-client:"dev-${{ steps.set-capi-client-data.outputs.branch }} as 999 .999.0" --no-update --working-dir ./${{env.REMEDIATION_ENGINE_PATH}}
291286 # CAPI client
292- composer require crowdsec/common:"dev-${{ steps.set-common-data.outputs.branch }} as ${{ steps.set-common-data.outputs.major_tag }} .999.0" --no-update --working-dir ./${{env.CAPI_CLIENT_PATH}}
287+ composer require crowdsec/common:"dev-${{ steps.set-common-data.outputs.branch }} as 999 .999.0" --no-update --working-dir ./${{env.CAPI_CLIENT_PATH}}
293288 # LAPI client
294- composer require crowdsec/common:"dev-${{ steps.set-common-data.outputs.branch }} as ${{ steps.set-common-data.outputs.major_tag }} .999.0" --no-update --working-dir ./${{env.LAPI_CLIENT_PATH}}
289+ composer require crowdsec/common:"dev-${{ steps.set-common-data.outputs.branch }} as 999 .999.0" --no-update --working-dir ./${{env.LAPI_CLIENT_PATH}}
295290
296291 - name : Validate composer.json
297292 run : |
@@ -336,6 +331,15 @@ jobs:
336331 echo $LAPI_CLIENT_VERSION
337332 exit 1
338333 fi
334+ CAPI_CLIENT_VERSION=$(ddev composer show crowdsec/capi-client --working-dir ./${{env.EXTENSION_PATH}} | grep -oP "versions : \* \K(.*)")
335+ if [[ $CAPI_CLIENT_VERSION == "dev-${{ steps.set-capi-client-data.outputs.branch }}" ]]
336+ then
337+ echo "CAPI_CLIENT_VERSION COMPARISON OK"
338+ else
339+ echo "CAPI_CLIENT_VERSION COMPARISON KO"
340+ echo $CAPI_CLIENT_VERSION
341+ exit 1
342+ fi
339343 REMEDIATION_ENGINE_VERSION=$(ddev composer show crowdsec/remediation-engine --working-dir ./${{env.EXTENSION_PATH}} | grep -oP "versions : \* \K(.*)")
340344 if [[ $REMEDIATION_ENGINE_VERSION == "dev-${{ steps.set-remediation-engine-data.outputs.branch }}" ]]
341345 then
0 commit comments