Skip to content

Commit

Permalink
Merge pull request #959 from 3YOURMIND/release-candidate-for-kotti-na…
Browse files Browse the repository at this point in the history
…ruto

version([email protected]): [email protected] and build system
  • Loading branch information
Isokaeder committed Jul 3, 2024
2 parents c24a7e3 + a44a9e8 commit 8d71f32
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ This monorepo supports a semi-automatic release workflow. To trigger an automati

a. Tag format: `versions/kotti-ui/1.2.3` (select `Create new tag: versions/kotti-ui/1.2.3 on publish`)

b. Title format: `1.2.3: tldr of what's happening`
b. Title format: `kotti-ui@1.2.3: tldr of what's happening`

c. Release notes: Follow guidelines of previous releases

Expand Down
24 changes: 18 additions & 6 deletions internals/scripts/source/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@
import { $, semver } from 'bun'
import { z } from 'zod'

/**
* Specified in order of dependency tree, e.g. kotti needs to be released last
* in order to pick up releases of its dependencies that happen in the same process
*/
const packagesToConsider = [
'packages/eslint-config',
'packages/vue-use-tippy',
'packages/yoco',
'packages/kotti-ui',
]

const packageJsonSchema = z.object({ name: z.string(), version: z.string() })
Expand All @@ -18,7 +23,7 @@ const getRemoteVersion = async (name: string): Promise<string | null> => {
}
}

const toPublish: string[] = []
const packagesToPublish: string[] = []

for (const path of packagesToConsider) {
const { name, version } = packageJsonSchema.parse(
Expand All @@ -39,16 +44,23 @@ for (const path of packagesToConsider) {
}

console.info(`${path}: scheduled for publishing`)
toPublish.push(name)
packagesToPublish.push(name)
}

if (toPublish.length === 0) {
if (packagesToPublish.length === 0) {
console.warn(`nothing to publish, exiting.`)
process.exit(0)
}

console.info(`attempting to publish ${toPublish.join(', ')}`)
const filters = packagesToPublish
.map((packageName) => `--filter=${packageName}`)
.join(' ')

// eslint-disable-next-line sonarjs/no-nested-template-literals
await $`yarn run turbo run publish-package --continue ${toPublish.map((packageName) => `--filter=${packageName}`).join(' ')}`
await $`yarn run turbo run build check test ${filters}`

console.info(`attempting to publish ${packagesToPublish.join(', ')}`)

for (const packageName of packagesToPublish) {
await $`yarn run turbo run publish-package --continue --filter=${packageName}`
}
/* eslint-enable no-console */
2 changes: 1 addition & 1 deletion packages/documentation/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"@3yourmind/kotti-ui": "*",
"@3yourmind/kotti-ui": "6.0.0-rc",
"@3yourmind/yoco": "*",
"@octokit/rest": "^20.0.2",
"@octokit/types": "^12.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@
},
"type": "module",
"types": "./dist/mjs/index.d.ts",
"version": "0.0.6"
"version": "0.0.7"
}
6 changes: 3 additions & 3 deletions packages/kotti-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"url": "https://github.com/3YOURMIND/kotti/issues"
},
"dependencies": {
"@3yourmind/vue-use-tippy": "2.x",
"@3yourmind/yoco": "^2.4.6",
"@3yourmind/vue-use-tippy": "3.x",
"@3yourmind/yoco": "^2.6.0",
"@metatypes/typography": "^0.5.0",
"@metatypes/units": "^0.5.0",
"big.js": "^6.2.1",
Expand Down Expand Up @@ -96,5 +96,5 @@
"style": "./dist/style.css",
"type": "module",
"types": "./dist/index.d.ts",
"version": "5.6.0"
"version": "6.0.0-rc"
}
2 changes: 1 addition & 1 deletion packages/vue-use-tippy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@
},
"type": "module",
"types": "./dist/mjs/index.d.ts",
"version": "2.0.0"
"version": "3.0.0"
}
2 changes: 1 addition & 1 deletion packages/yoco/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@
"style": "./style.css",
"type": "module",
"types": "./dist/mjs/index.d.ts",
"version": "2.5.0"
"version": "2.6.0"
}

0 comments on commit 8d71f32

Please sign in to comment.