diff --git a/.env.example b/.env.example index 93d9432..b24fe70 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,5 @@ # Project -IMAGE_TAG=v1.7.10 +IMAGE_TAG=v1.7.12 PROJECT_NAME=sample-website PROJECT_COLOR=#82ed20 diff --git a/apps/sample-website/package.json b/apps/sample-website/package.json index 4dbdb00..2e4c36a 100644 --- a/apps/sample-website/package.json +++ b/apps/sample-website/package.json @@ -1,6 +1,6 @@ { "name": "sample-website", - "version": "1.7.10", + "version": "1.7.12", "private": true, "type": "module", "scripts": { diff --git a/package.json b/package.json index c06b737..5ef3ca6 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "pino-pretty": "^13.1.3", "require-in-the-middle": "^8.0.1" }, - "version": "1.7.10", + "version": "1.7.12", "pnpm": { "overrides": { "next": "16.1.6", diff --git a/packages/acquisition-manager/package.json b/packages/acquisition-manager/package.json index ceefad8..14990bd 100644 --- a/packages/acquisition-manager/package.json +++ b/packages/acquisition-manager/package.json @@ -2,7 +2,7 @@ "name": "acquisition-manager", "description": "Custom High-Fidelity Acquisition Management for Directus", "icon": "account_balance_wallet", - "version": "1.7.10", + "version": "1.7.12", "type": "module", "keywords": [ "directus", diff --git a/packages/acquisition/package.json b/packages/acquisition/package.json index 9442645..92330d0 100644 --- a/packages/acquisition/package.json +++ b/packages/acquisition/package.json @@ -1,6 +1,6 @@ { "name": "acquisition", - "version": "1.7.10", + "version": "1.7.12", "type": "module", "directus:extension": { "type": "endpoint", diff --git a/packages/cli/package.json b/packages/cli/package.json index 1f8e960..72c6125 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@mintel/cli", - "version": "1.7.10", + "version": "1.7.12", "publishConfig": { "access": "public", "registry": "https://npm.infra.mintel.me" diff --git a/packages/cms-infra/package.json b/packages/cms-infra/package.json index e5bdc72..e2d0159 100644 --- a/packages/cms-infra/package.json +++ b/packages/cms-infra/package.json @@ -1,6 +1,6 @@ { "name": "@mintel/cms-infra", - "version": "1.7.10", + "version": "1.7.12", "private": true, "type": "module", "scripts": { diff --git a/packages/customer-manager/package.json b/packages/customer-manager/package.json index 6d749bb..426752b 100644 --- a/packages/customer-manager/package.json +++ b/packages/customer-manager/package.json @@ -2,7 +2,7 @@ "name": "customer-manager", "description": "Custom High-Fidelity Customer & Company Management for Directus", "icon": "supervisor_account", - "version": "1.7.10", + "version": "1.7.12", "type": "module", "keywords": [ "directus", diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 946a3cc..b3e299b 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -1,6 +1,6 @@ { "name": "@mintel/eslint-config", - "version": "1.7.10", + "version": "1.7.12", "publishConfig": { "access": "public", "registry": "https://npm.infra.mintel.me" diff --git a/packages/feedback-commander/package.json b/packages/feedback-commander/package.json index 90aa870..a0e6798 100644 --- a/packages/feedback-commander/package.json +++ b/packages/feedback-commander/package.json @@ -2,7 +2,7 @@ "name": "feedback-commander", "description": "Custom High-Fidelity Feedback Management Extension for Directus", "icon": "view_kanban", - "version": "1.7.10", + "version": "1.7.12", "type": "module", "keywords": [ "directus", diff --git a/packages/gatekeeper/package.json b/packages/gatekeeper/package.json index 359dfdd..5afe86a 100644 --- a/packages/gatekeeper/package.json +++ b/packages/gatekeeper/package.json @@ -33,4 +33,4 @@ "tailwindcss": "^3.4.17", "typescript": "^5.0.0" } -} \ No newline at end of file +} diff --git a/packages/husky-config/package.json b/packages/husky-config/package.json index c155ca2..614c953 100644 --- a/packages/husky-config/package.json +++ b/packages/husky-config/package.json @@ -1,6 +1,6 @@ { "name": "@mintel/husky-config", - "version": "1.7.10", + "version": "1.7.12", "publishConfig": { "access": "public", "registry": "https://npm.infra.mintel.me" diff --git a/packages/infra/package.json b/packages/infra/package.json index fca91e6..a08f804 100644 --- a/packages/infra/package.json +++ b/packages/infra/package.json @@ -1,6 +1,6 @@ { "name": "@mintel/infra", - "version": "1.7.10", + "version": "1.7.12", "publishConfig": { "access": "public", "registry": "https://npm.infra.mintel.me" diff --git a/packages/infra/scripts/wait-for-upstream.sh b/packages/infra/scripts/wait-for-upstream.sh index e5fd763..c51f680 100755 --- a/packages/infra/scripts/wait-for-upstream.sh +++ b/packages/infra/scripts/wait-for-upstream.sh @@ -24,40 +24,43 @@ GITEA_API="https://git.infra.mintel.me/api/v1" echo "🔎 Searching for upstream release $TAG in $REPO..." -# 1. Find the run for the specific tag -# We look for runs on the specific ref (refs/tags/vX.Y.Z) -RUN_QUERY=$(curl -s -H "Authorization: token $GITEA_TOKEN" "$GITEA_API/repos/$REPO/actions/runs?ref=refs/tags/$TAG") +# 1. Get the SHA of the tag to be more precise +TAG_INFO=$(curl -s -H "Authorization: token $GITEA_TOKEN" "$GITEA_API/repos/$REPO/tags/$TAG") +TARGET_SHA=$(echo "$TAG_INFO" | jq -r '.commit.sha // empty') -# Gitea returns a list of runs. We take the latest one by creation date. -RUN_ID=$(echo "$RUN_QUERY" | jq -r '.workflow_runs | sort_by(.created_at) | last | .id // empty') +if [[ -z "$TARGET_SHA" || "$TARGET_SHA" == "null" ]]; then + echo "âš ī¸ Warning: Tag $TAG not found yet. Upstream might be lagging." + echo " Waiting 15s for tag to appear..." + sleep 15 + TAG_INFO=$(curl -s -H "Authorization: token $GITEA_TOKEN" "$GITEA_API/repos/$REPO/tags/$TAG") + TARGET_SHA=$(echo "$TAG_INFO" | jq -r '.commit.sha // empty') + + if [[ -z "$TARGET_SHA" || "$TARGET_SHA" == "null" ]]; then + echo "❌ Error: Tag $TAG does not exist in $REPO." + exit 1 + fi +fi + +echo "✅ Target SHA for $TAG is $TARGET_SHA" + +# 2. Find the run for the specific SHA +# We list recent runs and filter by head_sha +RUN_QUERY=$(curl -s -H "Authorization: token $GITEA_TOKEN" "$GITEA_API/repos/$REPO/actions/runs?limit=30") +RUN_ID=$(echo "$RUN_QUERY" | jq -r ".workflow_runs[] | select(.head_sha == \"$TARGET_SHA\") | .id" | head -n 1) if [[ -z "$RUN_ID" || "$RUN_ID" == "null" ]]; then - echo "â„šī¸ No recent action run found for tag $TAG in $REPO." - echo "🔎 Checking if tag $TAG exists in the repository..." + echo "â„šī¸ No recent action run found for SHA $TARGET_SHA yet." + echo " Checking if we should wait or if it was already successful..." - TAG_EXISTS=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token $GITEA_TOKEN" "$GITEA_API/repos/$REPO/tags/$TAG") - - if [[ "$TAG_EXISTS" == "200" ]]; then - echo "✅ Tag $TAG exists. Assuming it was released successfully in the past." - exit 0 - fi - - echo "âš ī¸ Warning: Tag $TAG not found either. Upstream might be lagging or the version is invalid." - echo " Waiting 15s to see if it appears..." - sleep 15 - - RUN_QUERY=$(curl -s -H "Authorization: token $GITEA_TOKEN" "$GITEA_API/repos/$REPO/actions/runs?ref=refs/tags/$TAG") - RUN_ID=$(echo "$RUN_QUERY" | jq -r '.workflow_runs[0].id // empty') + # Fallback: wait a bit more for new tags + echo "âŗ waiting for run to appear..." + sleep 20 + RUN_QUERY=$(curl -s -H "Authorization: token $GITEA_TOKEN" "$GITEA_API/repos/$REPO/actions/runs?limit=30") + RUN_ID=$(echo "$RUN_QUERY" | jq -r ".workflow_runs[] | select(.head_sha == \"$TARGET_SHA\") | .id" | head -n 1) if [[ -z "$RUN_ID" || "$RUN_ID" == "null" ]]; then - # Final check for tag - TAG_EXISTS=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token $GITEA_TOKEN" "$GITEA_API/repos/$REPO/tags/$TAG") - if [[ "$TAG_EXISTS" == "200" ]]; then - echo "✅ Tag $TAG finally detected. Proceeding." - exit 0 - fi - echo "❌ Error: Could not find any action run OR tag for $TAG in $REPO." - exit 1 + echo "✅ No run found but Tag exists. Assuming manual release or already completed. Proceeding." + exit 0 fi fi diff --git a/packages/mail/package.json b/packages/mail/package.json index 6be6c89..9bce908 100644 --- a/packages/mail/package.json +++ b/packages/mail/package.json @@ -1,6 +1,6 @@ { "name": "@mintel/mail", - "version": "1.7.10", + "version": "1.7.12", "private": false, "publishConfig": { "access": "public", diff --git a/packages/next-config/package.json b/packages/next-config/package.json index 86ef356..01fbc75 100644 --- a/packages/next-config/package.json +++ b/packages/next-config/package.json @@ -1,6 +1,6 @@ { "name": "@mintel/next-config", - "version": "1.7.10", + "version": "1.7.12", "publishConfig": { "access": "public", "registry": "https://npm.infra.mintel.me" diff --git a/packages/next-feedback/package.json b/packages/next-feedback/package.json index 037cc5c..6c5e672 100644 --- a/packages/next-feedback/package.json +++ b/packages/next-feedback/package.json @@ -1,6 +1,6 @@ { "name": "@mintel/next-feedback", - "version": "1.7.10", + "version": "1.7.12", "publishConfig": { "access": "public", "registry": "https://npm.infra.mintel.me" diff --git a/packages/next-observability/package.json b/packages/next-observability/package.json index cfe1dd7..dfe67b8 100644 --- a/packages/next-observability/package.json +++ b/packages/next-observability/package.json @@ -1,6 +1,6 @@ { "name": "@mintel/next-observability", - "version": "1.7.10", + "version": "1.7.12", "publishConfig": { "access": "public", "registry": "https://npm.infra.mintel.me" diff --git a/packages/next-utils/package.json b/packages/next-utils/package.json index 4f9c40c..9cedd5d 100644 --- a/packages/next-utils/package.json +++ b/packages/next-utils/package.json @@ -1,6 +1,6 @@ { "name": "@mintel/next-utils", - "version": "1.7.10", + "version": "1.7.12", "publishConfig": { "access": "public", "registry": "https://npm.infra.mintel.me" diff --git a/packages/observability/package.json b/packages/observability/package.json index fa529b8..687e62f 100644 --- a/packages/observability/package.json +++ b/packages/observability/package.json @@ -1,6 +1,6 @@ { "name": "@mintel/observability", - "version": "1.7.10", + "version": "1.7.12", "publishConfig": { "access": "public", "registry": "https://npm.infra.mintel.me" diff --git a/packages/people-manager/package.json b/packages/people-manager/package.json index 5b763eb..8a02f79 100644 --- a/packages/people-manager/package.json +++ b/packages/people-manager/package.json @@ -2,7 +2,7 @@ "name": "people-manager", "description": "Custom High-Fidelity People Management for Directus", "icon": "person", - "version": "1.7.10", + "version": "1.7.12", "type": "module", "keywords": [ "directus", diff --git a/packages/tsconfig/package.json b/packages/tsconfig/package.json index 0b81803..0527a54 100644 --- a/packages/tsconfig/package.json +++ b/packages/tsconfig/package.json @@ -1,6 +1,6 @@ { "name": "@mintel/tsconfig", - "version": "1.7.10", + "version": "1.7.12", "publishConfig": { "access": "public", "registry": "https://npm.infra.mintel.me"