From 32ac769880c7d8a2b0290e75fe41b7d55f8c6548 Mon Sep 17 00:00:00 2001
From: Pieter van Staden <pieter@bob.co.za>
Date: Mon, 5 May 2025 13:36:26 +0200
Subject: [PATCH] INFRASTRUCTURE :: Resolve the issue causing the pipeline to
 trigger twice on a single push to the dev branch.

---
 .gitlab-ci.yml | 4 ++--
 composer.json  | 2 +-
 etc/module.xml | 2 +-
 package.json   | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b3a3a3d..6ad2e34 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -21,7 +21,7 @@ deploy:
     - ./make-zip.sh
     - aws s3 cp bobgo-magento-plugin.zip s3://bobgo-s3-magento-plugin-dev/ --region=af-south-1
   rules:
-    - if: $CI_COMMIT_BRANCH == "dev" && $CI_PIPELINE_SOURCE == "push"
+    - if: $CI_COMMIT_BRANCH == "dev"
       when: always
 
 tag_deploy:
@@ -40,7 +40,7 @@ tag_deploy:
     - "TAG_ARCHIVE_URL=https://gitlab.bob.co.za/bob-public-utils/bobgo-magento-extension/-/archive/${CI_COMMIT_TAG}/bobgo-magento-extension-${CI_COMMIT_TAG}.zip"
     - curl -o bobgo-magento-extension-${CI_COMMIT_TAG}.zip "$TAG_ARCHIVE_URL"
     - aws s3 cp bobgo-magento-extension-${CI_COMMIT_TAG}.zip s3://bobgo-s3-magento-plugin-prod/tags/bobgo-magento-extension-${CI_COMMIT_TAG}.zip --region=af-south-1 --acl public-read
-    - aws s3 cp bobgo-magento-extension-${CI_COMMIT_TAG}.zip s3://bobgo-s3-magento-plugin-prod/latest/bobgo-magento-extension-latest.zip --region=af-south-1 --acl public-read
+    - aws s3 cp bobgo-magento-extension-${CI_COMMIT_TAG}.zip s3://bobgo-s3-magento-plugin-prod/latest/latest.zip --region=af-south-1 --acl public-read
     - echo "Tagged version URL in S3 bucket ready for download"
   rules:
     - if: $CI_COMMIT_TAG
diff --git a/composer.json b/composer.json
index 83317ac..be20c4f 100644
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
     "name": "bobgo/bobgo-magento-extension",
     "description": "Smart shipping and order management solution in South Africa",
     "type": "magento2-module",
-    "version": "1.0.41",
+    "version": "1.0.51",
     "authors": [
         {
             "name": "Bob Go",
diff --git a/etc/module.xml b/etc/module.xml
index a79063f..3a66e65 100644
--- a/etc/module.xml
+++ b/etc/module.xml
@@ -7,7 +7,7 @@
  */
 -->
 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
-    <module name="BobGroup_BobGo" setup_version="1.0.41">
+    <module name="BobGroup_BobGo" setup_version="1.0.51">
         <sequence>
             <module name="Magento_Webapi"/>
             <module name="Magento_Catalog"/>
diff --git a/package.json b/package.json
index 7ca71f8..4b950c3 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
 {
   "name": "bobgo-magento-plugin",
   "description": "Bob Go magento plugin",
-  "version": "1.0.50",
+  "version": "1.0.51",
   "license": "GPL-2.0-or-later",
   "scripts": {
     "prepare": "husky install",
-- 
GitLab