Skip to content

Commit

Permalink
refactor(install.js): remove docker image update support from install…
Browse files Browse the repository at this point in the history
… action

It was already deprecated, we can remove it in this version

BREAKING CHANGE: Providing --image/-i flag to the install action will now error out.
  • Loading branch information
anacierdem committed Nov 11, 2023
1 parent 41b3b73 commit 8c768fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 21 deletions.
25 changes: 5 additions & 20 deletions modules/actions/install.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
const chalk = require('chalk').stderr;

const { installDependencies } = require('./utils');
const { start } = require('./start');
const { syncImageAndStart } = require('./update-and-start');
const { log } = require('../helpers');

/**
* Updates the image if flag is provided and install vendors onto the container.
Expand All @@ -15,22 +11,11 @@ const install = async (libdragonInfo) => {
let updatedInfo = libdragonInfo;

if (!process.env.DOCKER_CONTAINER) {
const imageName = libdragonInfo.options.DOCKER_IMAGE;
// If an image is provided, attempt to install
if (imageName) {
log(
chalk.yellow(
'Using `install` action to update the docker image is deprecated. Use the `update` action instead.'
)
);
updatedInfo = await syncImageAndStart(libdragonInfo);
} else {
// Make sure existing one is running
updatedInfo = {
...updatedInfo,
containerId: await start(libdragonInfo),
};
}
// Make sure existing one is running
updatedInfo = {
...updatedInfo,
containerId: await start(libdragonInfo),
};
}

// Re-install vendors on new image
Expand Down
1 change: 0 additions & 1 deletion modules/parameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ const parseParameters = async (argv) => {
!(
/** @type {typeof actions[keyof actions][]} */ ([
actions.init,
actions.install,
actions.update,
]).includes(options.CURRENT_ACTION)
) &&
Expand Down

0 comments on commit 8c768fd

Please sign in to comment.