Changes in pipeline

This commit is contained in:
DSR! committed 2024-05-19 22:43:18 -03:00
1 parent 8ebadfb00b
commit 05b996f362
3 files changed
+14 -8

No files matched your search

+5 -3
View File
@@ -73,12 +73,14 @@ jobs:
working-directory: ${{ env.INSTALLER_SCRIPT_PATH }}
run: |
Set-ExecutionPolicy Bypass -Scope Process -Force
.\generate-checksums.ps1 -Directory "${{ env.SRC_PATH }}/toolkit" -OutputFile "${{ env.SRC_PATH }}/tools_checksums.txt"
.\generate-checksums.ps1 -Directory "${{ env.SRC_PATH }}/toolkit" -OutputFile "${{ github.workspace }}/tools_checksums.txt"
.\generate-checksums.ps1 -Directory "${{ github.workspace }}" -FilePattern "*.exe" -OutputFile "${{ github.workspace }}/installer_checksums.txt"
- name: Upload Setup as Artifact
uses: actions/upload-artifact@v4
with:
name: setup-installer-artifact
path: |
./*.exe
${{ env.SRC_PATH }}/tools_checksums.txt
${{ github.workspace }}/*.exe
${{ github.workspace }}/tools_checksums.txt
${{ github.workspace }}/installer_checksums.txt
+8 -4
View File
@@ -1,6 +1,7 @@
param (
[string]$Directory = ".",
[string]$OutputFile = "checksums.txt"
[string]$OutputFile = "checksums.txt",
[string]$FilePattern = "*"
)
# Initialize an array to store the hash results
@@ -20,10 +21,13 @@ function Get-FileHashSHA256 {
return [BitConverter]::ToString($hash) -replace "-", ""
}
# Iterate over each file in the directory
Get-ChildItem -Path $Directory -File -Recurse | ForEach-Object {
# Get the full path of the directory
$fullDirectoryPath = (Get-Item -Path $Directory).FullName
# Iterate over each file in the directory matching the pattern
Get-ChildItem -Path $Directory -Filter $FilePattern -File -Recurse | ForEach-Object {
$fileHash = Get-FileHashSHA256 -filePath $_.FullName
$relativePath = $_.FullName.Substring((Get-Location).Path.Length + 1)
$relativePath = $_.FullName.Substring($fullDirectoryPath.Length).TrimStart('\')
$hashResults += "$fileHash .\$relativePath"
}
+1 -1
View File
@@ -70,7 +70,7 @@ class UnpackProject:
# Iterate sub folders
for item in pathlib.Path(folder_path).iterdir():
if item.is_dir():
print(colorama.Fore.MAGENTA + f' [!] Iterate sub folder: "{item}"')
#print(colorama.Fore.MAGENTA + f' [!] Iterate sub folder: "{item}"')
self.iterate_tool(item)
def iterate_tool_unpack(self, file_path, folder_path):