Skip to content
Snippets Groups Projects
Commit 5c7ad0b6 authored by Pieter van Staden's avatar Pieter van Staden
Browse files

Merge branch 'dev' into 'prod'

INFRASTRUCTURE :: Update the check to make sure the tag is created from the prod branch

See merge request !26
parents 2095f99d 6562dc4d
No related branches found
No related tags found
1 merge request!26INFRASTRUCTURE :: Update the check to make sure the tag is created from the prod branch
Pipeline #75165 failed
......@@ -33,13 +33,17 @@ tag_deploy:
- AWS_SECRET_ACCESS_KEY=$(eval echo -e "\$$AWS_SECRET_ACCESS_KEY_KEY")
- export AWS_ACCESS_KEY_ID
- export AWS_SECRET_ACCESS_KEY
# Fetch the prod branch
- git fetch origin prod
# Check if the tagged commit is from the prod branch using merge-base
- if git merge-base --is-ancestor "${CI_COMMIT_SHA}" origin/prod; then
# Ensure all branches and tags are fetched
- echo "Fetching all branches and tags..."
- git fetch --all
- git fetch --tags
# Verify the branch of origin for the tag
- |
branch=$(git branch -r --contains "${CI_COMMIT_SHA}" | grep -v 'tags/' | awk '{print $1}' | sed 's/origin\///' | head -n 1)
if [ "$branch" = "prod" ]; then
echo "Tag ${CI_COMMIT_TAG} is from the prod branch.";
else
echo "Tag ${CI_COMMIT_TAG} is not from the prod branch.";
echo "Tag ${CI_COMMIT_TAG} is not from the prod branch. It was created from the '${branch}' branch.";
exit 1;
fi
script:
......
......@@ -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.52",
"version": "1.0.56",
"authors": [
{
"name": "Bob Go",
......
......@@ -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.52">
<module name="BobGroup_BobGo" setup_version="1.0.56">
<sequence>
<module name="Magento_Webapi"/>
<module name="Magento_Catalog"/>
......
{
"name": "bobgo-magento-plugin",
"description": "Bob Go magento plugin",
"version": "1.0.52",
"version": "1.0.56",
"license": "GPL-2.0-or-later",
"scripts": {
"prepare": "husky install",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment