Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run a script after building an artifact

I'm doing a small LeJOS project using Idea. Everything is fine, except I would like the ready jar to be beamed straight to my EV3 brick after compilation of the artifact. I have a ready script for that, I launch it from command line manually now. But, hey! This is 21st century! How do I make Idea run my script automatically right after my artifact is built? Even better - how do I add a neat icon to that would do it all: 1) compile 2) run my script?

like image 645
ssuukk Avatar asked Sep 26 '22 10:09

ssuukk


1 Answers

Configure your script as a external tool "File > Settings > Tools > External Tools", then record and save the macro from "Edit > Macros > Start macro Recording" containing first building the project then invoking your external tool.

From now on you'll have just to play this macro from "Edit > Macros " (one action to call both build and beam).

Even more, you can add this macro as an icon to the toolbar (right click on the toolbar > Customize Menus and Toolbars, select an action from the "Main Toolbar", call "Add After" and choose your macro).

like image 150
Ivaylo D. Ivanov Avatar answered Sep 30 '22 06:09

Ivaylo D. Ivanov