Skip to content

Commit

Permalink
ARUMLPD-86 Added paramet for setting the target package.
Browse files Browse the repository at this point in the history
  • Loading branch information
kkadosa committed Dec 13, 2023
1 parent 2573852 commit 50a402b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
25 changes: 24 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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'
}
11 changes: 11 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 50a402b

Please sign in to comment.