@devcontainer/generator
Advanced tools
Comparing version 0.7.2 to 0.7.6
@@ -12,2 +12,3 @@ declare type Base = "stretch" | "buster" | "disco" | "eoan"; | ||
private _dotnet; | ||
private _upgrade; | ||
private _xfce; | ||
@@ -23,2 +24,3 @@ private _docker; | ||
setNoVNC(): void; | ||
setUpgraded(): void; | ||
setZsh(): void; | ||
@@ -25,0 +27,0 @@ setDocker(): void; |
@@ -14,3 +14,3 @@ "use strict"; | ||
this._templates = {}; | ||
this._templateInputs = ['base', 'git', 'node', 'cypress', 'dotnet', 'docker', 'dotnet3', 'xfce', 'noVNC', 'zsh']; | ||
this._templateInputs = ['base', 'upgrade', 'git', 'gitUbuntu', 'node', 'cypress', 'dotnet', 'docker', 'dotnet3', 'xfce', 'noVNC', 'zsh']; | ||
this._nodeVesion = null; | ||
@@ -20,2 +20,3 @@ this._gitVersion = ''; | ||
this._dotnet = null; | ||
this._upgrade = false; | ||
this._xfce = false; | ||
@@ -45,2 +46,5 @@ this._docker = false; | ||
} | ||
setUpgraded() { | ||
this._upgrade = true; | ||
} | ||
setZsh() { | ||
@@ -61,4 +65,13 @@ this._zsh = true; | ||
this._dockerfile += templates['base'].replace('{DISTRO}', this.base); | ||
if (this._upgrade) { | ||
const now = new Date(); | ||
this._dockerfile += templates['upgrade'].replace('{DEV_VERSION}', `${now.getFullYear()}-${now.getMonth()}-${now.getDate()}`); | ||
} | ||
if (this._gitVersion) { | ||
this._dockerfile += templates['git'].replace('{GIT_VERSION}', this._gitVersion); | ||
if (getDistro(this.base) === "Ubuntu") { | ||
this._dockerfile += templates['gitUbuntu']; | ||
} | ||
else { | ||
this._dockerfile += templates['git'].replace('{GIT_VERSION}', this._gitVersion); | ||
} | ||
} | ||
@@ -65,0 +78,0 @@ if (this._nodeVesion) { |
{ | ||
"name": "@devcontainer/generator", | ||
"version": "0.7.2", | ||
"version": "0.7.6", | ||
"description": "generates custorm devcontainer Dockerfiles", | ||
@@ -23,3 +23,3 @@ "files": [ | ||
"license": "MIT", | ||
"gitHead": "d56aa77501394b598394dd8f88d9d9f25b610ec0" | ||
"gitHead": "286688323d635ec5bc9274eb6547d0d5272100fe" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
26177
21
174