Skip to content
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

update to latest @lando/core@edge and also prep packaged CLI for bett… #236

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 74 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,74 @@
## v3.21.0-alpha.4 - [December 12, 2023](https://github.com/lando/cli/releases/tag/v3.21.0-alpha.4)

### **DANGER NOTES**

This is an `alpha` release which means:

* Definitely don't try it out unless you are into [risky business](https://www.youtube.com/watch?v=G2UVsyVLLcE)
* It is "feature complete" but has very little automated testing so we cannot guarantee any level of "it works" beyond "it works on our machines" ;)
* Subsequent releases could be breaking, _very breaking_

So, basically, if you have real work you need to do we recommend you [don't try it](https://www.youtube.com/watch?v=7Ood-IE7sx4)!

### Installation Notes

If you decide to try it out and want `lando update` to grab new versions of the cli then you need to install the cli in a directory owned by your user eg **DO NOT** install it someplace like `/usr/local/bin`.

Your best bet is to do something like this:

```bash
mkdir -p ~/.lando/bin
curl https://github.com/lando/cli/releases/download/v3.21.0-alpha.3/lando-macos-arm64-v3.21.0-alpha.4 -fsSLo ~/.lando/bin/lando-v3.21.0-alpha.4
chmod +x ~/.lando/bin/lando-v3.21.0-alpha.4
ln -sf ~/.lando/bin/lando-v3.21.0-alpha.4 ~/.lando/bin/lando
```

Note that you will need to replace the above with a link for your OS and ARCH and then make sure that `~/.lando/bin` is in your `$PATH`.

### Releases

* Changed release assets to only include `@lando/core` by default. Run `lando setup` to fetch all the previously packaged plugins. Subsequent releases will offer fully packaged binaries and a `slim` option.

### New Features

* Added `autostart` Docker Engine support to Linux
* Added `lando update` command so Lando and installed plugins can self-update
* Added hidden `lando setup` command to replace package installers
* Added hidden `lando plugin-add` command to install external plugins
* Added hidden `lando plugin-remove` command to remove external plugins
* Improved `lando version` to give more total version information

### Fixes

* Fixed broken Docker Compose|Desktop|Engine links
* Fixed bug causing `lando` services to report `Up` when they actually `Exited` non-zero
* Fixed longstanding bug causing some debug output to print to `stdout` instead of `stderr`
* Improved post-start status message granularity, they can one of `tip|info|warn|error` now
* Improved post-start status message accessibility
* Improved "Update Available" warning to be less **INTENSE**, is now a post-start info message

### Internal

* Added `app.addMessage` for more granular and accessible post-start app status reporting
* Changed `lando.log` and `app.log` to be more like `debug`
* Changed `lando version` to now track `@lando/core|@lando/core-next` instead of `@lando/cli`
* Bumped minimum `node` version to `18`
* Bumped supported Docker Desktop version to `>4 <4.27`
* Removed lingering and dangling should-now-be-in-plugins code eg `_drupaly.js`
* Reorganized core to be more like `@lando/core-next` (eg Lando 4)
* Reorganized cli to be more like `@lando/core-next` (eg Lando 4)
* Switched (fully, finally) from `github` to `@octokit/rest`
* Switched plugin package manager to `npm`
* Removed `bundledDependencies` from `package.json`, now handled by `@lando/prepare-release-action@v3`
* Removed `dayjs` dependency
* Removed `github` dependency
* Removed `mkdirp` dependency

### DEPRECATIONS

* DEPRECATED `app.addWarning` in favor of `app.addMessage`


## v3.21.0-alpha.3 - [December 7, 2023](https://github.com/lando/cli/releases/tag/v3.21.0-alpha.3)

### **DANGER NOTES**
Expand All @@ -18,9 +89,9 @@ Your best bet is to do something like this:

```bash
mkdir -p ~/.lando/bin
curl https://github.com/lando/cli/releases/download/v3.21.0-alpha.2/lando-macos-arm64-v3.21.0-alpha.2 -fsSLo ~/.lando/bin/lando-v3.21.0-alpha.2
chmod +x ~/.lando/bin/lando-v3.21.0-alpha.2
ln -sf ~/.lando/bin/lando-v3.21.0-alpha.2 ~/.lando/bin/lando
curl https://github.com/lando/cli/releases/download/v3.21.0-alpha.3/lando-macos-arm64-v3.21.0-alpha.3 -fsSLo ~/.lando/bin/lando-v3.21.0-alpha.3
chmod +x ~/.lando/bin/lando-v3.21.0-alpha.3
ln -sf ~/.lando/bin/lando-v3.21.0-alpha.3 ~/.lando/bin/lando
```

Note that you will need to replace the above with a link for your OS and ARCH and then make sure that `~/.lando/bin` is in your `$PATH`.
Expand Down
31 changes: 18 additions & 13 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,21 +294,23 @@ module.exports = class Cli {
* Init
*/
init(yargs, tasks, config, userConfig) {
// Define usage
const cmd = !_.has(process, 'pkg') ? '$0' : path.basename(_.get(process, 'execPath', 'lando'));
const usage = [`Usage: ${cmd} <command> [args] [options]`];
if (userConfig.experimental) {
usage.push(`${this.makeArt('print', {text: '(experimental mode)', color: 'magenta'})}`);
}
// @TODO: what if we are running from symlink?

// basic usage
const usage = ['Usage: $0 <command> [args] [options]'];
// add experimental mode info
if (userConfig.experimental) usage.push(`${this.makeArt('print', {text: '(experimental mode)', color: 'magenta'})}`);

// Yargs!
yargs.usage(usage.join(' '))
.demandCommand(1, 'You need at least one command before moving on')
.example('lando start', 'Run lando start')
.example('lando rebuild --help', 'Get help about using the lando rebuild command')
.example('lando destroy -y -vvv', 'Run lando destroy non-interactively and with maximum verbosity')
.example('lando --clear', 'Clear the lando tasks cache')
.example('$0 start', 'Run lando start')
.example('$0 rebuild --help', 'Get help about using the lando rebuild command')
.example('$0 destroy -y --debug', 'Run lando destroy non-interactively and with maximum verbosity')
.example('$0 --clear', 'Clear the lando tasks cache')
.middleware([(argv => {
argv['$0'] = 'lhello';
console.log(argv);
argv._app = config;
})])
.recommendCommands()
Expand All @@ -329,16 +331,19 @@ module.exports = class Cli {
else yargs.command(this.parseToYargs(task, config));
});

// Modify the script name in certain circumstances eg its packaged and being invoked from a symlink
// @NOTE: should we check for argv0 being a symlink?
if (_.has(process, 'pkg') && path.join(process.cwd(), process.argv0) !== process.execPath) {
yargs.scriptName(path.basename(process.argv0));
}

// Show help unless this is a delegation command
const current = _.find(tasks, {command: yargs.argv._[0]});
if ((yargs.argv.help || yargs.argv.lando) && _.get(current, 'delegate', false) === false) {
yargs.showHelp('log');
process.exit(0);
}

// if we are in v3 and --debug is set then set -vvv
// @TODO: handle --debug for v3?

// YARGZ MATEY
yargs.argv;
}
Expand Down
Loading
Loading