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

Upgrade tool: Add upgrade task for script profile changes #4117

Merged
merged 3 commits into from Mar 2, 2024

Conversation

florian-h05
Copy link
Contributor

Refs #4058.

/cc @jimtng @J-N-K

Refs openhab#4058.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 requested a review from a team as a code owner February 28, 2024 11:51
@@ -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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<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",
Copy link
Member

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.

Copy link
Contributor Author

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 👍

Copy link
Contributor Author

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>
Copy link
Member

@J-N-K J-N-K left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@J-N-K J-N-K merged commit 45f8bff into openhab:main Mar 2, 2024
3 checks passed
@J-N-K J-N-K added the enhancement An enhancement or new feature of the Core label Mar 2, 2024
@J-N-K J-N-K added this to the 4.2 milestone Mar 2, 2024
@florian-h05 florian-h05 deleted the scriptprofile-upgrade-tool branch March 2, 2024 09:53
@jimtng jimtng mentioned this pull request Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature of the Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants