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
Upgrade tool: Add upgrade task for script profile changes #4117
Conversation
Refs openhab#4058. Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
tools/upgradetool/pom.xml
Outdated
@@ -15,7 +15,7 @@ | |||
<packaging>jar</packaging> | |||
|
|||
<name>openHAB Core :: Tools :: Upgrade tool</name> | |||
<description>A tool for upgrading openHAB from 3.4 to 4.0</description> | |||
<description>A tool for upgrading openHAB from 3.4 to 4.x</description> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<description>A tool for upgrading openHAB from 3.4 to 4.x</description> | |
<description>A tool for upgrading openHAB</description> |
*/ | ||
@NonNullByDefault | ||
public class Upgrader { | ||
public static final String ITEM_COPY_UNIT_TO_METADATA = "itemCopyUnitToMetadata"; | ||
public static final String LINK_UPGRADE_JS_PROFILE = "linkUpgradeJsProfile"; | ||
public static final String LINK_UPGRADE_SCRIPT_PROFILE = "linkUpgradeScriptProfile"; | ||
private static final Set<String> SCRIPT_PROFILE_NAMES = Set.of("transform:NASHORNJS", "transform:JS", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it make more sense to use transform:.*
and match a regex? Otherwise script profiles with JRule, JavaRule or other languages would not be transformed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this should work as well 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Refs #4058.
/cc @jimtng @J-N-K