headlamp icon indicating copy to clipboard operation
headlamp copied to clipboard

plugins/headlamp-plugin: Add upgrade command

Open illume opened this issue 1 year ago • 0 comments

An upgrade command for upgrading plugins (and folders of plugins).

For https://github.com/kinvolk/headlamp/issues/426

  • [x] Check if headlamp-plugin is outdated when starting npm start
  • [x] When package is upgraded, make sure the version is also updated (For example ^0.5.0 should be ^0.5.1)
  • [x] Upgrade @kinvolk/headlamp-plugin if it is outdated. On one folder or many.
  • [x] Add extra config inside package.json (like the new eslint/prettier config)
  • [x] Add extra required config files (like a previous version did with a tsconfig file)
  • [x] Add tests

How to use

Testing this PR before it's released:

node plugins/headlamp-plugin/bin/headlamp-plugin.js upgrade plugins/examples

When it's released

Upgrade multiple folders

npx @kinvolk/headlamp-plugin upgrade plugins/examples

Upgrade current folder

cd plugins/examples/sidebar
npx @kinvolk/headlamp-plugin upgrade

Testing done

  • [x] run it against our plugins/examples/
  • [x] Add a few tests to test-headlamp-plugin.sh

illume avatar Aug 02 '22 00:08 illume