Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Commit

Permalink
Publish deprecation message for dev
Browse files Browse the repository at this point in the history
  • Loading branch information
chrmarti committed Oct 30, 2023
1 parent 600571b commit 6aa288a
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 25 deletions.
1 change: 1 addition & 0 deletions build/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"githubRepoName": "microsoft/vscode-dev-containers",
"containersPathInRepo": "containers",
"historyFolderName": "history",
"repoContainersToBuildPath": "repository-containers/images",
"scriptLibraryPathInRepo": "script-library",
"scriptLibraryFolderNameInDefinition": "library-scripts",
"historyUrlPrefix": "https://github.com/microsoft/vscode-dev-containers/tree/main/containers/",
Expand Down
62 changes: 38 additions & 24 deletions build/src/utils/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,48 @@ async function loadConfig(repoPath) {
repoPath = repoPath || path.join(__dirname, '..', '..', '..');
const definitionBuildConfigFile = getConfig('definitionBuildConfigFile', 'definition-manifest.json');

// Get list of definition folders
const containersPath = path.join(repoPath, getConfig('containersPathInRepo', 'containers'));
const definitions = await asyncUtils.readdir(containersPath, { withFileTypes: true });
await asyncUtils.forEach(definitions, async (definitionFolder) => {
// If directory entry is a file (like README.md, skip
if (!definitionFolder.isDirectory()) {
return;
}

const definitionId = definitionFolder.name;
const definitionPath = path.resolve(path.join(containersPath, definitionId));

// If a .deprecated file is found, remove the directory from staging and return
if(await asyncUtils.exists(path.join(definitionPath, '.deprecated'))) {
await asyncUtils.rimraf(definitionPath);
return;
}

// Add to complete list of definitions
// // Get list of definition folders
// const containersPath = path.join(repoPath, getConfig('containersPathInRepo', 'containers'));
// const definitions = await asyncUtils.readdir(containersPath, { withFileTypes: true });
// await asyncUtils.forEach(definitions, async (definitionFolder) => {
// // If directory entry is a file (like README.md, skip
// if (!definitionFolder.isDirectory()) {
// return;
// }

// const definitionId = definitionFolder.name;
// const definitionPath = path.resolve(path.join(containersPath, definitionId));

// // If a .deprecated file is found, remove the directory from staging and return
// if(await asyncUtils.exists(path.join(definitionPath, '.deprecated'))) {
// await asyncUtils.rimraf(definitionPath);
// return;
// }

// // Add to complete list of definitions
// allDefinitionPaths[definitionId] = {
// path: definitionPath,
// relativeToRootPath: path.relative(repoPath, definitionPath)
// }
// // If definition-manifest.json exists, load it
// const manifestPath = path.join(definitionPath, definitionBuildConfigFile);
// if (await asyncUtils.exists(manifestPath)) {
// await loadDefinitionManifest(manifestPath, definitionId);
// }
// });

// Load repo containers to build
const repoContainersToBuildPath = path.join(repoPath, getConfig('repoContainersToBuildPath', 'repository-containers/build'));
const repoContainerManifestFiles = glob.sync(`${repoContainersToBuildPath}/**/${definitionBuildConfigFile}`);
await asyncUtils.forEach(repoContainerManifestFiles, async (manifestFilePath) => {
const definitionPath = path.resolve(path.dirname(manifestFilePath));
const definitionId = path.relative(repoContainersToBuildPath, definitionPath);
console.log(`Loading definition ID: ${definitionId}`);
allDefinitionPaths[definitionId] = {
path: definitionPath,
relativeToRootPath: path.relative(repoPath, definitionPath)
}
// If definition-manifest.json exists, load it
const manifestPath = path.join(definitionPath, definitionBuildConfigFile);
if (await asyncUtils.exists(manifestPath)) {
await loadDefinitionManifest(manifestPath, definitionId);
}
await loadDefinitionManifest(manifestFilePath, definitionId);
});

// Populate image variants and tag lookup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,10 @@ ENV DBUS_SESSION_BUS_ADDRESS="autolaunch:" \

ENTRYPOINT ["/usr/local/share/desktop-init.sh"]
CMD ["sleep", "infinity"]

RUN echo 'echo "NOTE: This Docker image has been discontinued and no longer receives any updates."' \
| tee -a /home/node/.bashrc \
| tee -a /home/node/.zshrc \
| tee -a /root/.bashrc \
| tee -a /root/.zshrc \
>/dev/null
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"definitionVersion": "0.204.0",
"definitionVersion": "0.204.1",
"build": {
"latest": true,
"rootDistro": "debian",
Expand Down

0 comments on commit 6aa288a

Please sign in to comment.