@@ -233,39 +233,6 @@ jobs:
233233 -nodeReuse:false
234234 shell : pwsh
235235
236- - name : Remove WebApiLib dll
237- run : |
238- find . -type f -name "*.dmapp" -print0 | while IFS= read -r -d '' file; do
239- echo "Updating $file"
240-
241- # Create a temp directory
242- temp_dir=$(mktemp -d)
243-
244- # Unzip the .dmapp file into the temp dir
245- unzip -q "$file" -d "$temp_dir"
246-
247- echo "📂 Files before removal:"
248- find "$temp_dir" -type f
249-
250- # Find and delete all files ending in WebApiLib.dll
251- find "$temp_dir" -type f -name "*WebApiLib.dll" -exec rm -f {} \;
252-
253- echo "📂 Files after removal:"
254- find "$temp_dir" -type f
255-
256- # Recreate the .dmapp file
257- (cd "$temp_dir" && zip -qr "../temp.dmapp" .)
258-
259- # Move the new archive back to the original file
260- mv -f "$temp_dir/../temp.dmapp" "$file"
261-
262- # Cleanup
263- rm -rf "$temp_dir"
264-
265- echo "Cleaned $file"
266-
267- done
268-
269236 - name : Unit Tests
270237 # when not using MSTest you'll need to install coverlet.collector nuget in your test solutions
271238 id : unit-tests
@@ -312,6 +279,46 @@ jobs:
312279 --debug "${{ inputs.debug }}"
313280 done
314281
282+ - name : Remove WebApiLib dll
283+ run : |
284+ find . -type f -name "*.dmapp" -print0 | while IFS= read -r -d '' file; do
285+ echo "Updating $file"
286+
287+ # Create a temp directory
288+ temp_dir=$(mktemp -d)
289+
290+ # Unzip the .dmapp file into the temp dir
291+ unzip -q "$file" -d "$temp_dir"
292+
293+ echo "📂 Files before removal:"
294+ find "$temp_dir" -type f
295+
296+ # Remove the specific line from Description.txt (if it exists)
297+ desc_file=$(find "$temp_dir" -type f -name "Description.txt")
298+ if [[ -f "$desc_file" ]]; then
299+ echo "📝 Cleaning Description.txt at $desc_file"
300+ sed -i '/ProtocolScripts\\DllImport\\WebApiLib\.dll/d' "$desc_file"
301+ fi
302+
303+ # Find and delete all files ending in WebApiLib.dll
304+ find "$temp_dir" -type f -name "*WebApiLib.dll" -exec rm -f {} \;
305+
306+ echo "📂 Files after removal:"
307+ find "$temp_dir" -type f
308+
309+ # Recreate the .dmapp file
310+ (cd "$temp_dir" && zip -qr "../temp.dmapp" .)
311+
312+ # Move the new archive back to the original file
313+ mv -f "$temp_dir/../temp.dmapp" "$file"
314+
315+ # Cleanup
316+ rm -rf "$temp_dir"
317+
318+ echo "Cleaned $file"
319+
320+ done
321+
315322 - uses : actions/upload-artifact@v4
316323 with :
317324 name : DataMiner Installation Packages (${{ inputs.configuration }} ${{ inputs.solutionFilterName }})
@@ -357,7 +364,7 @@ jobs:
357364 shell : bash
358365
359366 - name : Find branch
360- if : inputs.referenceType == 'tag' && inputs.referenceName == 'main'
367+ if : inputs.referenceType == 'tag'
361368 id : findBranch
362369 run : |
363370 #!/bin/bash
@@ -371,21 +378,21 @@ jobs:
371378 shell : bash
372379
373380 - name : Target Branch
374- if : inputs.referenceType == 'tag' && inputs.referenceName == 'main'
381+ if : inputs.referenceType == 'tag'
375382 id : showResultBranch
376383 run : echo "${{ steps.findBranch.outputs.branch }}"
377384
378385 - name : Find Installation package
379- if : inputs.referenceType == 'tag' && inputs.referenceName == 'main'
386+ if : inputs.referenceType == 'tag'
380387 id : findInstallationPackage
381388 run : |
382389 IFS=$'\n'
383- echo dmappPackageName=$(find _DataMinerInstallationPackage -type f -name '*.dmapp') >> $GITHUB_OUTPUT
390+ echo dmappPackageName=$(find '${{ github.workspace }}/Low Code App Editor Package' -type f -name '*.dmapp') >> $GITHUB_OUTPUT
384391 unset IFS
385392 shell : bash
386393
387394 - name : Target Installation Package
388- if : inputs.referenceType == 'tag' && inputs.referenceName == 'main'
395+ if : inputs.referenceType == 'tag'
389396 id : showResultPackage
390397 run : echo "${{ steps.findInstallationPackage.outputs.dmappPackageName }}"
391398
@@ -401,17 +408,17 @@ jobs:
401408 --debug "${{ inputs.debug }}"
402409
403410 - name : Publish To Catalog
404- if : inputs.referenceType == 'tag' && inputs.referenceName == 'main'
411+ if : inputs.referenceType == 'tag'
405412 env :
406413 DATAMINER_TOKEN : ${{ secrets.dataminerToken }}
407414 shell : pwsh
408415 run : |
409416 dataminer-catalog-upload with-registration `
410417 --path-to-catalog-yml "${{ github.workspace }}/Low Code App Editor Package/CatalogInformation/manifest.yml" `
411- --path-to-readme "${{ github.workspace }}/Low Code App Editor Package/CatalogInformation/README.md"
412- --path-to-images "${{ github.workspace }}/Low Code App Editor Package/CatalogInformation/Images"
418+ --path-to-readme "${{ github.workspace }}/Low Code App Editor Package/CatalogInformation/README.md" `
419+ --path-to-images "${{ github.workspace }}/Low Code App Editor Package/CatalogInformation/Images" `
413420 --dm-catalog-token "${{ secrets.dataminerToken }}" `
414- --path-to-artifact "${{ steps.findInstallationPackage.outputs.dmappPackageName }}"
415- --artifact-version ${{ inputs.referenceName }}
416- --branch "${{ steps.findBranch.outputs.branch }}"
421+ --path-to-artifact "${{ steps.findInstallationPackage.outputs.dmappPackageName }}" `
422+ --artifact-version ${{ inputs.referenceName }} `
423+ --branch "${{ steps.findBranch.outputs.branch }}" `
417424 --debug "${{ inputs.debug }}"
0 commit comments