-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve catchup script #236
Conversation
263038e
to
9a19a1c
Compare
9a19a1c
to
13bbe11
Compare
fef1d3f
to
bdf1ea3
Compare
…anch and update the English branch we need to compare current Ember version and new Ember version
…ef-upstream and upstream/master and parse it as an array of filenames
…arguments to the script
…o create for each changed file
…tions required at the end of the process
…iles in the script/patches folder
…to track the files to post in a GitHub issue
…les to create the diff files
…e need to do this because we want to do a replacement in the content
…e filename and from the content of the diff
…e updated path, so the file can be patched in our architecture
…f git apply fails (file translated), then we add to filesToPost to open a GitHub issue later
…ction so we know if there are patch files to commit and push
…t requires to read the secret token.
…n file and diff. There's no diff block if the file is new
…ssue for a given file
… the GitHub issues
…ally, push the changes on GitHub
…ss. One reset ref-upstream then the other will switch back to master or the catchup branch depending on the situation
… only if we no longer need the current state (all operations to create/edit diff files are ok), and switch back to the best branch
bdf1ea3
to
7f63c73
Compare
… ends with code 1
7f63c73
to
facdee3
Compare
|
||
} catch (error) { | ||
console.error('Failed to push the catchup branch.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warn?
@@ -1,201 +1,282 @@ | |||
import 'dotenv/config'; | |||
import fetch from 'node-fetch'; | |||
import { execSync } from 'child_process'; | |||
import fs from 'fs'; | |||
import minimist from 'minimist-lite'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You hsould consider using
https://www.npmjs.com/package/command-line-args
https://www.npmjs.com/package/command-line-usage
const commandLineArgs = require('command-line-args');
const commandLineUsage = require('command-line-usage');
They are more nice for dev experience and you can print the help text easily
I need to merge the PR to finalize my blog post and have the link to the up-to-date script. But I'll keep issue #220 open to handle the comments. |
Related to #220