-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* bugfix: Copied update-blueprints.js * chore: Ran update-blueprints-v2-addon * chore: Added changeset --------- Co-authored-by: ijlee2 <ijlee2@users.noreply.github.com>
- Loading branch information
Showing
5 changed files
with
113 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"create-v2-addon-repo": patch | ||
--- | ||
|
||
Copied update-blueprints.js |
53 changes: 53 additions & 0 deletions
53
packages/create-v2-addon-repo/src/blueprints/blueprints/v2-addon/update-blueprints.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/usr/bin/env node | ||
'use strict'; | ||
|
||
import gitDiffApply from 'git-diff-apply'; | ||
import yargs from 'yargs'; | ||
import { hideBin } from 'yargs/helpers'; | ||
|
||
const CURRENT_VERSION = '0.1.0'; | ||
|
||
async function updateBlueprints({ from, to }) { | ||
const startTag = from; | ||
const endTag = to; | ||
|
||
try { | ||
await gitDiffApply({ | ||
cwd: process.cwd(), | ||
endTag, | ||
ignoredFiles: ['CHANGELOG.md'], | ||
remoteUrl: 'https://github.com/ijlee2/blueprints-v2-addon-output/', | ||
startTag, | ||
}); | ||
} catch (error) { | ||
console.error(`git-diff-apply: ${error}`); | ||
} | ||
} | ||
|
||
// Provide a title to the process in `ps` | ||
process.title = 'update-blueprints'; | ||
|
||
yargs(hideBin(process.argv)) | ||
.command({ | ||
builder: (yargs) => { | ||
return yargs | ||
.option('from', { | ||
default: CURRENT_VERSION, | ||
describe: "The start version (e.g. '0.1.0')", | ||
type: 'string', | ||
}) | ||
.option('to', { | ||
describe: "The end version (e.g. '0.5.0')", | ||
type: 'string', | ||
}) | ||
.demandOption(['to']); | ||
}, | ||
command: '*', | ||
describe: 'Updates the blueprints for v2 addons', | ||
handler: (argv) => { | ||
updateBlueprints(argv); | ||
}, | ||
}) | ||
.demandCommand() | ||
.strict() | ||
.parseSync(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
...on-repo/tests/fixtures/typescript/output/my-repo/blueprints/v2-addon/update-blueprints.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/usr/bin/env node | ||
'use strict'; | ||
|
||
import gitDiffApply from 'git-diff-apply'; | ||
import yargs from 'yargs'; | ||
import { hideBin } from 'yargs/helpers'; | ||
|
||
const CURRENT_VERSION = '0.1.0'; | ||
|
||
async function updateBlueprints({ from, to }) { | ||
const startTag = from; | ||
const endTag = to; | ||
|
||
try { | ||
await gitDiffApply({ | ||
cwd: process.cwd(), | ||
endTag, | ||
ignoredFiles: ['CHANGELOG.md'], | ||
remoteUrl: 'https://github.com/ijlee2/blueprints-v2-addon-output/', | ||
startTag, | ||
}); | ||
} catch (error) { | ||
console.error(`git-diff-apply: ${error}`); | ||
} | ||
} | ||
|
||
// Provide a title to the process in `ps` | ||
process.title = 'update-blueprints'; | ||
|
||
yargs(hideBin(process.argv)) | ||
.command({ | ||
builder: (yargs) => { | ||
return yargs | ||
.option('from', { | ||
default: CURRENT_VERSION, | ||
describe: "The start version (e.g. '0.1.0')", | ||
type: 'string', | ||
}) | ||
.option('to', { | ||
describe: "The end version (e.g. '0.5.0')", | ||
type: 'string', | ||
}) | ||
.demandOption(['to']); | ||
}, | ||
command: '*', | ||
describe: 'Updates the blueprints for v2 addons', | ||
handler: (argv) => { | ||
updateBlueprints(argv); | ||
}, | ||
}) | ||
.demandCommand() | ||
.strict() | ||
.parseSync(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters