-
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.
- Loading branch information
SPRINX0\prochazka
committed
Feb 21, 2025
1 parent
3c0ce80
commit c8aa98d
Showing
9 changed files
with
189 additions
and
131 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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 |
---|---|---|
@@ -1,15 +1,39 @@ | ||
import path from 'path'; | ||
import { Processor } from './processor'; | ||
import { Command } from 'commander'; | ||
|
||
if (process.argv.length < 3) { | ||
console.error('Usage: gitdiff <state-repo-url>'); | ||
process.exit(1); | ||
} | ||
const program = new Command(); | ||
|
||
const skipPush = process.argv.includes('--skip-push'); | ||
const clear = process.argv.includes('--clear'); | ||
program | ||
.name('diflow') | ||
.description('Git diflow - maintain sync between GIT 3 repos (base+diff=merged)') | ||
.version('1.0.0'); | ||
|
||
const processor = new Processor(process.argv[2], path.join(__dirname, 'workrepos'), { skipPush, clear }); | ||
processor.process(); | ||
program | ||
.command('sync') | ||
.description('Ryn sync between GIT 3 repos (base+diff=merged)') | ||
.requiredOption('-r, --repo', 'URL to control repo repo (configuration+state)') | ||
.requiredOption('-b, --branch', 'Branch name to be processed') | ||
.option('--skip-push', 'skip pushing changes to remote') | ||
.option('--clear', 'clear work repos before running') | ||
.action(options => { | ||
const processor = new Processor(options.config, options.branch, path.join(__dirname, 'workrepos'), { | ||
skipPush: options.skipPush, | ||
clear: options.clear, | ||
}); | ||
processor.process(); | ||
console.log('Processing complete.'); | ||
}); | ||
|
||
// if (process.argv.length < 3) { | ||
// console.error('Usage: gitdiff <state-repo-url>'); | ||
// process.exit(1); | ||
// } | ||
|
||
// const skipPush = process.argv.includes('--skip-push'); | ||
// const clear = process.argv.includes('--clear'); | ||
|
||
// const processor = new Processor(process.argv[2], path.join(__dirname, 'workrepos'), { skipPush, clear }); | ||
// processor.process(); | ||
|
||
console.log('Processing complete.'); |
Oops, something went wrong.