-
Notifications
You must be signed in to change notification settings - Fork 12
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
Feature/colliehub version tag #281
Conversation
e1bf8ec
to
92dd064
Compare
b46faa7
to
87e916a
Compare
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.
lgtm but only a few minor issues
@@ -118,7 +118,7 @@ export class CliApiFacadeFactory { | |||
const detectorRunner = this.buildQuietLoggingProcessRunner(); | |||
const detector = new GitCliDetector(detectorRunner); | |||
|
|||
const processRunner = this.buildTransparentProcessRunner(detector); | |||
const processRunner = this.buildQuietLoggingProcessRunner(); |
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.
The whole runner setup is quite complex. But when looking close we already have a process runner with the required type. I wonder if something like
public buildGit() {
const detectorRunner = this.buildQuietLoggingProcessRunner();
const detector = new GitCliDetector(detectorRunner);
const resultHandler = new ProcessRunnerErrorResultHandler(detector);
const quietRunner = new ResultHandlerProcessRunnerDecorator(
new QuietProcessRunner(),
resultHandler,
);
return new GitCliFacade(detectorRunner, quietRunner);
}
works too so we need one less runner?
"--tags", | ||
"--abbrev=0", | ||
], { cwd: repoDir }); | ||
return result.stdout.trim(); |
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.
return result.stdout.trim(); | |
return result.stdout.trim(); |
s: empty line before return
"git", | ||
"tag", | ||
], { cwd: repoDir }); | ||
return result.stdout.trim(); |
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.
s: empty line before return.
try { | ||
const allTags = await this.git.getTags(hubCacheGitDir); | ||
if (!allTags.includes(collieHubVersion)) { | ||
throw new Error( |
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.
d: this is strange. you throw an error here but directly catch it 3 lines later. In this case, if you dont need to stop something through multiple call-layers I suggest to just directly stop the execution in here by directly calling Deno.exit() instead of throwing an error.
now its possible to pin a version for the hub in collie-cli. If no version was pinned, it takes the latest one. the collie.json is the config file for the version pinning.