diff --git a/action.yml b/action.yml index 6a7aed9..3051f74 100644 --- a/action.yml +++ b/action.yml @@ -22,6 +22,12 @@ inputs: license: description: "The contents of the supplied license file." required: true + targetPackageGuid: + description: "The GUID of the package where the imported elements are placed." + required: false + targetPackagePath: + description: "The path to the package where the imported elements are placed." + required: false runs: using: "composite" @@ -97,4 +103,21 @@ runs: shell: pwsh run: | $env:ARUML_HOME = 'C:\Program Files\IncQuery Labs\IncQuery AUTOSAR-UML Bridge\Transformation\' - & 'C:\Program Files\IncQuery Labs\IncQuery AUTOSAR-UML Bridge\CLI\iql-aub-cli.exe' -i '${{ inputs.arxml_folder_path }}' -e '${{ inputs.ea_model_file_path }}' -l '${{ runner.temp }}/IncQueryAUBLic.yaml' + + $targetPackageGuid = [System.Management.Automation.Language.CodeGeneration]::EscapeSingleQuotedStringContent("${{ inputs.targetPackageGuid }}") + $targetPackagePath = [System.Management.Automation.Language.CodeGeneration]::EscapeSingleQuotedStringContent("${{ inputs.targetPackagePath }}") + if (!([string]::IsNullOrWhitespace($targetPackageGuid))) + { + echo "Run transformation by target GUID" + & 'C:\Program Files\IncQuery Labs\IncQuery AUTOSAR-UML Bridge\CLI\iql-aub-cli.exe' -i '${{ inputs.arxml_folder_path }}' -e '${{ inputs.ea_model_file_path }}' -l '${{ runner.temp }}/IncQueryAUBLic.yaml' -t '${{ targetPackageGuid }}' + } + elseif (!([string]::IsNullOrWhitespace($targetPackagePath))) + { + echo "Run transformation by target path" + & 'C:\Program Files\IncQuery Labs\IncQuery AUTOSAR-UML Bridge\CLI\iql-aub-cli.exe' -i '${{ inputs.arxml_folder_path }}' -e '${{ inputs.ea_model_file_path }}' -l '${{ runner.temp }}/IncQueryAUBLic.yaml' -p '${{ targetPackagePath }}' + } + else + { + echo "Run transformation by default target" + & 'C:\Program Files\IncQuery Labs\IncQuery AUTOSAR-UML Bridge\CLI\iql-aub-cli.exe' -i '${{ inputs.arxml_folder_path }}' -e '${{ inputs.ea_model_file_path }}' -l '${{ runner.temp }}/IncQueryAUBLic.yaml' + } diff --git a/readme.md b/readme.md index 3c32f07..5d7e5c5 100644 --- a/readme.md +++ b/readme.md @@ -83,3 +83,14 @@ Username and password to *artifacts.incquery.io*. Contents of the license file as-is. The AutosarUMLIntegration and AutosarUMLIntegrationCI license features are required. This parameter is mandatory. + +#### targetPackageGuid + +The GUID of the package where the imported elements are placed. Takes priority over targetPackagePath if both are specified. + If neither targetPackageGuid or targetPackagePath are set, elements are placed into the alphabetically-first root model. + +#### targetPackagePath + +The path to the package where the imported elements are placed, separated by "." characters. + Ignored if targetPackageGuid is specified. If neither targetPackageGuid or targetPackagePath are set, + elements are placed into the alphabetically-first root model.