Skip to content

Commit e83a66a

Browse files
committed
fix: new idea
1 parent 8389982 commit e83a66a

File tree

2 files changed

+44
-46
lines changed

2 files changed

+44
-46
lines changed

packages/vue-quill/src/assets/snow.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ backgroundColor = #fff
55
inactiveColor = #4B5563
66
shadowColor = #D1D5DB
77
textColor = #4B5563
8-
// Additional color
8+
// Additional colors
99
backgroundHoverColor = #F3F4F6
1010
backgroundActiveColor = #DBEAFE
1111

scripts/release.ts

Lines changed: 43 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(async () => {
2-
// const chalk = require('chalk')
3-
// const execa = require('execa')
2+
const chalk = require('chalk')
3+
const execa = require('execa')
44
const path = require('path')
55
const semanticRelease = require('semantic-release')
66
// const { WritableStreamBuffer } = require('stream-buffers');
@@ -21,12 +21,6 @@
2121
plugins: [
2222
'@semantic-release/commit-analyzer',
2323
'@semantic-release/release-notes-generator',
24-
[
25-
"@semantic-release/exec",
26-
{
27-
prepareCmd: "npx ts-node ../../scripts/build.ts --nextVersion ${nextRelease.version}"
28-
}
29-
],
3024
'@semantic-release/npm',
3125
[
3226
'@semantic-release/github',
@@ -46,22 +40,23 @@
4640
await run()
4741

4842
async function run() {
49-
// const nextVersion = await getNextVersion()
50-
// await prepare(target)
43+
const nextVersion = await getNextVersion()
44+
console.log(nextVersion)
45+
await prepare(target)
5146
await release()
5247
}
5348

54-
// async function prepare(target: string/*, nextVersion: string*/) {
55-
// try {
56-
// // const buildScript = path.resolve(__dirname, 'build.ts')
57-
// // console.log(chalk.bgCyan("Build package"))
58-
// // execa.sync('npx', ['ts-node', buildScript, '--nextVersion', nextVersion])
59-
// console.log(chalk.bgCyan("Zipping distribution file"))
60-
// execa.sync('zip', ['-r', `${target}-dist.zip`, '.', '-i', 'dist'])
61-
// } catch (err) {
62-
// console.log(`>>>>>>>>>>>>> ${err}`)
63-
// }
64-
// }
49+
async function prepare(target: string/*, nextVersion: string*/) {
50+
try {
51+
// const buildScript = path.resolve(__dirname, 'build.ts')
52+
// console.log(chalk.bgCyan("Build package"))
53+
// execa.sync('npx', ['ts-node', buildScript, '--nextVersion', nextVersion])
54+
console.log(chalk.bgCyan("Zipping distribution file"))
55+
execa.sync('zip', ['-r', `${target}-dist.zip`, '.', '-i', 'dist'])
56+
} catch (err) {
57+
console.log(`>>>>>>>>>>>>> ${err}`)
58+
}
59+
}
6560

6661
async function release() {
6762
try {
@@ -108,28 +103,31 @@
108103
}
109104
}
110105

111-
// async function getNextVersion(): Promise<string> {
112-
// try {
113-
// const { nextRelease } = await semanticRelease({
114-
// branches: releaserc.branches,
115-
// repositoryUrl: pkg.repository.url,
116-
// dryRun: true,
117-
// ci: false,
118-
// plugins: [
119-
// '@semantic-release/commit-analyzer',
120-
// [
121-
// "@semantic-release/exec",
122-
// {
123-
// prepareCmd: "npx ts-node ../../scripts/build.ts --nextVersion ${nextRelease.version}"
124-
// }
125-
// ]
126-
// ]
127-
// })
128-
// if (nextRelease) return nextRelease.version
129-
// else console.log('No release will bepublished')
130-
// } catch (err) {
131-
// console.error('Failed to retrieve next version with %O', err)
132-
// }
133-
// return pkg.version
134-
// }
106+
async function getNextVersion(): Promise<string> {
107+
try {
108+
const { nextRelease } = await semanticRelease({
109+
branches: releaserc.branches,
110+
repositoryUrl: pkg.repository.url,
111+
dryRun: true,
112+
ci: false,
113+
plugins: [
114+
'@semantic-release/commit-analyzer',
115+
[
116+
"@semantic-release/exec",
117+
{
118+
prepareCmd: "npx ts-node ../../scripts/build.ts --nextVersion ${nextRelease.version}"
119+
}
120+
]
121+
]
122+
}, {
123+
cwd: '../../',
124+
env: { ...process.env }
125+
})
126+
if (nextRelease) return nextRelease.version
127+
else console.log('No release will bepublished')
128+
} catch (err) {
129+
console.error('Failed to retrieve next version with %O', err)
130+
}
131+
return pkg.version
132+
}
135133
})()

0 commit comments

Comments
 (0)