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

chore: adding options to keep legacy behavior in export-dynamic script #1729

Merged
merged 4 commits into from
May 29, 2024

Conversation

jesuino
Copy link
Contributor

@jesuino jesuino commented May 28, 2024

A PR for RHIDP-2110 and RHIDP-2123.

Related PR: janus-idp/backstage-showcase#1285

After manually testing and checking the command then I used the following script to update all package.json( it requires jq to run).

#!/bin/bash
for plugin in ./plugins/*
do
        package="$plugin/package.json"
        echo "Opening $package"
        echo $(
                cat "$package" | jq -r '
                                if  .scripts."export-dynamic"  then
                                     if .backstage.role == "frontend-plugin" then 
                                             .scripts."export-dynamic" += " --in-place"
                                     elif (.backstage.role == "backend-plugin-module" or .backstage.role == "backend-plugin") then
                                             .scripts."export-dynamic" += " --no-embed-as-dependencies"
                                     else
                                             .scripts."export-dynamic" = .scripts."export-dynamic"
                                     end
                                 else .
                                 end
                                ') > $package


done

@davidfestal
Copy link
Member

/approve

@jesuino jesuino changed the title chore: adding options to optimize export-dynamic chore: adding options to keep legacy behavior in export-dynamic script May 29, 2024
@jesuino jesuino changed the title chore: adding options to keep legacy behavior in export-dynamic script chore: adding options to keep legacy behavior in export-dynamic script. May 29, 2024
@jesuino jesuino changed the title chore: adding options to keep legacy behavior in export-dynamic script. chore: adding options to keep legacy behavior in export-dynamic script May 29, 2024
Copy link

sonarcloud bot commented May 29, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.7% Duplication on New Code

See analysis details on SonarCloud

@davidfestal
Copy link
Member

/approve
/lgtm

Copy link

openshift-ci bot commented May 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: davidfestal

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 6de0125 into janus-idp:main May 29, 2024
11 checks passed
ciiay pushed a commit to ciiay/backstage-plugins that referenced this pull request Jun 1, 2024
janus-idp#1729)

* RHIDP-2110: RHIDP-2123: adding options to optimize export-dynamic

* Updating bulk import janus-cli version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants