Skip to content

Commit

Permalink
release dev
Browse files Browse the repository at this point in the history
  • Loading branch information
kewcoder committed Dec 14, 2024
1 parent d3b64d3 commit 43fc022
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 17 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 2 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,12 @@
"build:core": "cd packages/core && npm run build",
"build:dashboard": "npm install && cd packages/dashboard && npm run build",
"build": "npm run build:core && npm run build:dashboard && npm install && npm run build:storybook && npm run build:landing",
"version:update-core": "cd packages/core && npm version minor",
"version:update-dashboard": "cd packages/dashboard && npm version minor",
"version:update-core-patch": "cd packages/core && npm version patch",
"version:update-dashboard-patch": "cd packages/dashboard && npm version patch",
"update:version-patch": "npm run version:update-core-patch && npm run version:update-dashboard-patch",
"update:version-minor": "npm run version:update-core && npm run version:update-dashboard",
"publish:core": "npm run build:core && cd packages/core && npm publish",
"publish:dashboard": "npm run build:dashboard && cd packages/dashboard && npm publish",
"publish-dev:core": "npm run build:core && cd packages/core && npm publish --tag beta",
"publish-dev:dashboard": "npm run build:dashboard && cd packages/dashboard && npm publish --tag beta",
"release": "npm run update:version-patch && bun run release.js"
"release-prod": "bun run release.js",
"release": "bun run release-dev.js"
},
"dependencies": {
"@popperjs/core": "^2.11.8",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@orchidui/core",
"description": "Orchid UI, Library Vue 3 tailwind css",
"version": "1.0.22",
"version": "1.0.23-7",
"type": "module",
"scripts": {
"build": "vite build"
Expand Down
6 changes: 3 additions & 3 deletions packages/dashboard/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@orchidui/dashboard",
"description": "Orchid Dashboard UI , Dashboard Ui Library Vue 3 tailwind css",
"version": "1.0.22",
"version": "1.0.23-7",
"type": "module",
"scripts": {
"build": "vite build"
Expand Down Expand Up @@ -33,6 +33,6 @@
"rollup": "npm:@rollup/wasm-node"
},
"dependencies": {
"@orchidui/core": "1.0.22"
"@orchidui/core": "1.0.23-6"
}
}
}
23 changes: 23 additions & 0 deletions release-dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { exec } from 'child_process'
exec('cd packages/core && npm version prerelease')
exec('cd packages/dashboard && npm version prerelease')

const { version } = require('./packages/core/package.json')
const fs = require('fs')
const packageJsonPath = './packages/dashboard/package.json'

// Function to update a dependency version
function updateDependency(dependencyName, newVersion) {
// Read the package.json file
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'))
// Check and update in dependencies
if (packageJson.dependencies && packageJson.dependencies[dependencyName]) {
packageJson.dependencies[dependencyName] = newVersion
console.log(`Updated ${dependencyName} to version ${newVersion} in dependencies.`)
}
// Write the updated package.json file back
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), 'utf-8')
console.log('package.json updated successfully.')
}

updateDependency('@orchidui/core', version)
4 changes: 4 additions & 0 deletions release.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import { exec } from 'child_process'
exec('cd packages/core && npm version minor')
exec('cd packages/dashboard && npm version minor')

const { version } = require('./packages/core/package.json')

const fs = require('fs')
Expand Down

0 comments on commit 43fc022

Please sign in to comment.