fix: sync versions
This commit is contained in:
@@ -36,6 +36,10 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: 🏷️ Sync Versions (if Tagged)
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
run: pnpm sync-versions
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: pnpm lint
|
run: pnpm lint
|
||||||
|
|
||||||
@@ -77,7 +81,6 @@ jobs:
|
|||||||
- name: 🏷️ Release Packages (Tag-Driven)
|
- name: 🏷️ Release Packages (Tag-Driven)
|
||||||
run: |
|
run: |
|
||||||
echo "🏷️ Tag detected [${{ github.ref_name }}], performing sync release..."
|
echo "🏷️ Tag detected [${{ github.ref_name }}], performing sync release..."
|
||||||
pnpm sync-versions
|
|
||||||
pnpm release:tag
|
pnpm release:tag
|
||||||
|
|
||||||
build-images:
|
build-images:
|
||||||
|
|||||||
15
.husky/pre-push
Executable file
15
.husky/pre-push
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
. "$(dirname -- "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
# Check if we are pushing a tag
|
||||||
|
if echo "$*" | grep -q "refs/tags/v"; then
|
||||||
|
echo "🏷️ Tag detected in push, syncing versions..."
|
||||||
|
pnpm sync-versions
|
||||||
|
|
||||||
|
# Stage the changed package.json files
|
||||||
|
git add "package.json" "packages/*/package.json" "apps/*/package.json"
|
||||||
|
|
||||||
|
# Amend the tag if it's on the current commit, but this is complex in pre-push.
|
||||||
|
# Better: Just warn the user that they might need to update the tag if package.json changed.
|
||||||
|
echo "⚠️ package.json files updated to match tag. Please ensure these changes are part of your tag/commit."
|
||||||
|
fi
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sample-website",
|
"name": "sample-website",
|
||||||
"version": "0.1.1",
|
"version": "1.6.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -45,5 +45,6 @@
|
|||||||
"pino": "^10.3.1",
|
"pino": "^10.3.1",
|
||||||
"pino-pretty": "^13.1.3",
|
"pino-pretty": "^13.1.3",
|
||||||
"require-in-the-middle": "^8.0.1"
|
"require-in-the-middle": "^8.0.1"
|
||||||
}
|
},
|
||||||
|
"version": "1.6.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mintel/cli",
|
"name": "@mintel/cli",
|
||||||
"version": "1.0.1",
|
"version": "1.6.0",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public",
|
"access": "public",
|
||||||
"registry": "https://npm.infra.mintel.me"
|
"registry": "https://npm.infra.mintel.me"
|
||||||
@@ -28,4 +28,4 @@
|
|||||||
"@types/prompts": "^2.4.4",
|
"@types/prompts": "^2.4.4",
|
||||||
"@mintel/tsconfig": "workspace:*"
|
"@mintel/tsconfig": "workspace:*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "@mintel/cms-infra",
|
"name": "@mintel/cms-infra",
|
||||||
"version": "1.0.0",
|
"version": "1.6.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"up": "docker compose up -d",
|
"up": "docker compose up -d",
|
||||||
"down": "docker compose down",
|
"down": "docker compose down",
|
||||||
"logs": "docker compose logs -f"
|
"logs": "docker compose logs -f"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,29 +1,29 @@
|
|||||||
{
|
{
|
||||||
"name": "customer-manager",
|
"name": "customer-manager",
|
||||||
"description": "Custom High-Fidelity Customer & Company Management for Directus",
|
"description": "Custom High-Fidelity Customer & Company Management for Directus",
|
||||||
"icon": "supervisor_account",
|
"icon": "supervisor_account",
|
||||||
"version": "1.0.0",
|
"version": "1.6.0",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"directus",
|
"directus",
|
||||||
"directus-extension",
|
"directus-extension",
|
||||||
"directus-extension-module"
|
"directus-extension-module"
|
||||||
],
|
],
|
||||||
"files": [
|
"files": [
|
||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
"directus:extension": {
|
"directus:extension": {
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"path": "index.js",
|
"path": "index.js",
|
||||||
"source": "src/index.ts",
|
"source": "src/index.ts",
|
||||||
"host": "*",
|
"host": "*",
|
||||||
"name": "Customer Manager"
|
"name": "Customer Manager"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "directus-extension build",
|
"build": "directus-extension build",
|
||||||
"dev": "directus-extension build -w"
|
"dev": "directus-extension build -w"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@directus/extensions-sdk": "11.0.2",
|
"@directus/extensions-sdk": "11.0.2",
|
||||||
"vue": "^3.4.0"
|
"vue": "^3.4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mintel/eslint-config",
|
"name": "@mintel/eslint-config",
|
||||||
"version": "1.0.1",
|
"version": "1.6.0",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public",
|
"access": "public",
|
||||||
"registry": "https://npm.infra.mintel.me"
|
"registry": "https://npm.infra.mintel.me"
|
||||||
|
|||||||
@@ -1,29 +1,29 @@
|
|||||||
{
|
{
|
||||||
"name": "@mintel/extension-feedback-commander",
|
"name": "@mintel/extension-feedback-commander",
|
||||||
"description": "Custom High-Fidelity Feedback Management Extension for Directus",
|
"description": "Custom High-Fidelity Feedback Management Extension for Directus",
|
||||||
"icon": "view_kanban",
|
"icon": "view_kanban",
|
||||||
"version": "1.0.0",
|
"version": "1.6.0",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"directus",
|
"directus",
|
||||||
"directus-extension",
|
"directus-extension",
|
||||||
"directus-extension-module"
|
"directus-extension-module"
|
||||||
],
|
],
|
||||||
"files": [
|
"files": [
|
||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
"directus:extension": {
|
"directus:extension": {
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"path": "dist/index.js",
|
"path": "dist/index.js",
|
||||||
"source": "src/index.ts",
|
"source": "src/index.ts",
|
||||||
"host": "*",
|
"host": "*",
|
||||||
"name": "Feedback Commander"
|
"name": "Feedback Commander"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "directus-extension build",
|
"build": "directus-extension build",
|
||||||
"dev": "directus-extension build -w"
|
"dev": "directus-extension build -w"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@directus/extensions-sdk": "11.0.2",
|
"@directus/extensions-sdk": "11.0.2",
|
||||||
"vue": "^3.4.0"
|
"vue": "^3.4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mintel/gatekeeper",
|
"name": "@mintel/gatekeeper",
|
||||||
"version": "1.0.0",
|
"version": "1.6.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
"@mintel/next-utils": "workspace:*",
|
"@mintel/next-utils": "workspace:*",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"lucide-react": "^0.474.0",
|
"lucide-react": "^0.474.0",
|
||||||
"next": "15.1.7",
|
"next": "16.1.6",
|
||||||
"next-intl": "^4.8.2",
|
"next-intl": "^4.8.2",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0",
|
||||||
"react-dom": "^19.0.0",
|
"react-dom": "^19.0.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mintel/husky-config",
|
"name": "@mintel/husky-config",
|
||||||
"version": "1.0.0",
|
"version": "1.6.0",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public",
|
"access": "public",
|
||||||
"registry": "https://npm.infra.mintel.me"
|
"registry": "https://npm.infra.mintel.me"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mintel/infra",
|
"name": "@mintel/infra",
|
||||||
"version": "1.0.1",
|
"version": "1.6.0",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public",
|
"access": "public",
|
||||||
"registry": "https://npm.infra.mintel.me"
|
"registry": "https://npm.infra.mintel.me"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mintel/mail",
|
"name": "@mintel/mail",
|
||||||
"version": "1.2.0",
|
"version": "1.6.0",
|
||||||
"private": false,
|
"private": false,
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public",
|
"access": "public",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mintel/next-config",
|
"name": "@mintel/next-config",
|
||||||
"version": "1.0.1",
|
"version": "1.6.0",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public",
|
"access": "public",
|
||||||
"registry": "https://npm.infra.mintel.me"
|
"registry": "https://npm.infra.mintel.me"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mintel/next-feedback",
|
"name": "@mintel/next-feedback",
|
||||||
"version": "1.0.0",
|
"version": "1.6.0",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public",
|
"access": "public",
|
||||||
"registry": "https://npm.infra.mintel.me"
|
"registry": "https://npm.infra.mintel.me"
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
"framer-motion": "^11.5.4",
|
"framer-motion": "^11.5.4",
|
||||||
"html2canvas": "^1.4.1",
|
"html2canvas": "^1.4.1",
|
||||||
"lucide-react": "^0.441.0",
|
"lucide-react": "^0.441.0",
|
||||||
"next": "15.1.7",
|
"next": "16.1.6",
|
||||||
"tailwind-merge": "^2.5.2"
|
"tailwind-merge": "^2.5.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mintel/next-observability",
|
"name": "@mintel/next-observability",
|
||||||
"version": "1.0.0",
|
"version": "1.6.0",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public",
|
"access": "public",
|
||||||
"registry": "https://npm.infra.mintel.me"
|
"registry": "https://npm.infra.mintel.me"
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@mintel/observability": "workspace:*",
|
"@mintel/observability": "workspace:*",
|
||||||
"@sentry/nextjs": "^8.55.0",
|
"@sentry/nextjs": "^8.55.0",
|
||||||
"next": "15.1.7"
|
"next": "16.1.6"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": "^18.0.0 || ^19.0.0",
|
"react": "^18.0.0 || ^19.0.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mintel/next-utils",
|
"name": "@mintel/next-utils",
|
||||||
"version": "1.0.1",
|
"version": "1.6.0",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public",
|
"access": "public",
|
||||||
"registry": "https://npm.infra.mintel.me"
|
"registry": "https://npm.infra.mintel.me"
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@directus/sdk": "^21.0.0",
|
"@directus/sdk": "^21.0.0",
|
||||||
"next": "15.1.7",
|
"next": "16.1.6",
|
||||||
"next-intl": "^4.8.2",
|
"next-intl": "^4.8.2",
|
||||||
"zod": "^3.0.0"
|
"zod": "^3.0.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mintel/observability",
|
"name": "@mintel/observability",
|
||||||
"version": "1.0.0",
|
"version": "1.6.0",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public",
|
"access": "public",
|
||||||
"registry": "https://npm.infra.mintel.me"
|
"registry": "https://npm.infra.mintel.me"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mintel/tsconfig",
|
"name": "@mintel/tsconfig",
|
||||||
"version": "1.0.1",
|
"version": "1.6.0",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public",
|
"access": "public",
|
||||||
"registry": "https://npm.infra.mintel.me"
|
"registry": "https://npm.infra.mintel.me"
|
||||||
|
|||||||
525
pnpm-lock.yaml
generated
525
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,45 @@
|
|||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
import * as path from "path";
|
import * as path from "path";
|
||||||
|
|
||||||
const tag = process.env.GITHUB_REF_NAME || process.env.TAG;
|
import { execSync } from "child_process";
|
||||||
|
|
||||||
if (!tag || !tag.startsWith("v")) {
|
/**
|
||||||
console.error("❌ No valid tag found (must start with v, e.g., v1.0.0)");
|
* Gets the current version tag from environment or git.
|
||||||
process.exit(1);
|
*/
|
||||||
|
function getVersionTag() {
|
||||||
|
// 1. Check CI environment variables
|
||||||
|
if (
|
||||||
|
process.env.GITHUB_REF_NAME &&
|
||||||
|
process.env.GITHUB_REF_NAME.startsWith("v")
|
||||||
|
) {
|
||||||
|
return process.env.GITHUB_REF_NAME;
|
||||||
|
}
|
||||||
|
if (process.env.TAG && process.env.TAG.startsWith("v")) {
|
||||||
|
return process.env.TAG;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Try to get it from local git
|
||||||
|
try {
|
||||||
|
const gitTag = execSync("git describe --tags --abbrev=0", {
|
||||||
|
encoding: "utf8",
|
||||||
|
}).trim();
|
||||||
|
if (gitTag && gitTag.startsWith("v")) {
|
||||||
|
return gitTag;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
// Fallback or silence
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const tag = getVersionTag();
|
||||||
|
|
||||||
|
if (!tag) {
|
||||||
|
console.log(
|
||||||
|
"ℹ️ No version tag found (starting with v). Skipping version sync.",
|
||||||
|
);
|
||||||
|
process.exit(0); // Exit gracefully if no tag is present
|
||||||
}
|
}
|
||||||
|
|
||||||
const version = tag.replace(/^v/, "");
|
const version = tag.replace(/^v/, "");
|
||||||
|
|||||||
Reference in New Issue
Block a user