diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 49fff358f001f810d984ea6515329edfe5e4e278..03559820d5d8cbd039d7f3178cb252cbd0ba2457 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,18 +14,38 @@ Windows-MSYS2-MINGW64: - ./msys2.exe -y -oC:\ - $env:CHERE_INVOKING = 'yes' - $env:MSYSTEM = 'MINGW64' # https://www.msys2.org/docs/environments/ + - | + echo "Updating Path" + $NewPath = "C:\Your\New\Directory" + $CurrentPath = [System.Environment]::GetEnvironmentVariable("Path", "User") -split ";" + Write-Output "old Path: $CurrentPath" + if ($CurrentPath -contains $NewPath) { + Write-Output "Path is already in the user PATH variable." + } else { + Write-Output "Path is NOT in the user PATH variable. Updating..." + [System.Environment]::SetEnvironmentVariable("Path", "$($CurrentPath -join ';');$NewPath", "User") + Write-Output "Path updated successfully!" + } + - | + $CurrentPath = [System.Environment]::GetEnvironmentVariable("Path", "User") -split ";" + Write-Output "new Path: $CurrentPath" - C:\msys64\usr\bin\bash -lc ' ' - C:\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syuu' - C:\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syuu' - | C:\msys64\usr\bin\bash -lcx ' pacman --noconfirm -Syu mingw-w64-ucrt-x86_64-gcc mingw-w64-x86_64-cmake + pacman --noconfirm -Syu mingw-w64-x86_64-qt5-static pacman --noconfirm -Syu zip' - | C:\msys64\usr\bin\bash -lcx ' mkdir -p build cd build cmake .. -DCMAKE_BUILD_TYPE=Release + ls -lh + rm -r * + cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ + ls -lh cmake --build . --target cute ls -lh cd ..' @@ -60,6 +80,8 @@ Publish: assets: links: - name: "Windows Template" + link_type: package url: "${CI_API_V4_URL}/projects/$CI_PROJECT_ID/packages/generic/cutelib-hsrt/$CI_COMMIT_TAG/template-windows.zip" #- name: "Linux Template" + # link_type: package # url: "${CI_API_V4_URL}/projects/$CI_PROJECT_ID/packages/generic/cutelib-hsrt/$CI_COMMIT_TAG/template-linux.zip"