-
Notifications
You must be signed in to change notification settings - Fork 8
Add the ability to use local source instead of cloning the repository #26
Conversation
Codecov Report
@@ Coverage Diff @@
## master #26 +/- ##
==========================================
- Coverage 98.53% 98.22% -0.32%
==========================================
Files 17 17
Lines 547 562 +15
Branches 60 64 +4
==========================================
+ Hits 539 552 +13
- Misses 8 10 +2
Continue to review full report at Codecov.
|
That would work for someone that is using Che locally - which is not the primary use case. How would that work with a remote Che? If not, that should be highlighted |
@slemeur it is not about running che locally or not, it is about using sources that may be already present in the file system (in the case of a docker build of che-theia, dockerfile is in the same repo than extensions and plugins ... but we still clone it from git even if we could just do a copy) |
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.
Approving again
@sunix the codecov is failing as it's reducing code coverage |
…. Introducing alias for change the source location from the command line Signed-off-by: Sun Tan <[email protected]>
Signed-off-by: Sun Tan <[email protected]>
@@ -271,8 +266,14 @@ export class InitSources { | |||
* @param extension the extension to clone | |||
*/ | |||
async clone(extension: ISource): Promise<void> { | |||
const repository = new Repository(extension.source); | |||
extension.clonedDir = await repository.clone(this.cheTheiaFolder, repository.getRepositoryName(), extension.checkoutTo); | |||
if (fs.existsSync(extension.source)) { |
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.
await fs.pathExists(extension.source)
?
repository has been moved to https://github.com/eclipse/che-theia/tree/50767320ae233bad5109d308e9b87d52b97e8ea1/generator |
Support the
--alias
option:will replace source folder designed by
https://github.com/eclipse/che-theia
in https://github.com/eclipse/che-theia/blob/master/che-theia-init-sources.yml.If the folder
/projects/theia/che/che-theia
is not empty, it won't clone the folder again and use it as it is.The goal is to be able to skip clonning if the sources are already present.
https://github.com/eclipse/che-theia/issues/208