Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:
# Git Checkout
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
fetch-depth: 0
Expand All @@ -32,7 +32,7 @@ jobs:
id: ml
# You can override MegaLinter flavor used to have faster performances
# More info at https://megalinter.github.io/flavors/
uses: megalinter/megalinter@v7.9.0
uses: megalinter/megalinter@v8.4.2
env:
# All available variables are described in documentation
# https://megalinter.github.io/configuration/
Expand All @@ -42,7 +42,7 @@ jobs:
# Upload MegaLinter artifacts
- name: Archive production artifacts
if: ${{ success() }} || ${{ failure() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: MegaLinter reports
path: |
Expand Down
34 changes: 2 additions & 32 deletions Cryptomator/create_install.bat
Original file line number Diff line number Diff line change
@@ -1,34 +1,4 @@
@pushd "%~dp0"
@call "%~dp0..\.tools\env_tools.bat"

set latest_version="https://cryptomator.org/downloads/win-msi/thanks"
echo Downloading: %latest_version% ...
>raw_download_str.tmp (
%curl% --location %latest_version% | %grep% --only-matching "(?<=href="")[^\s]*\.msi(?="")" | %head% -n1
)
if %errorlevel% neq 0 (
echo Cannot get latest version
exit /b %errorlevel%
)

set /p download_url=< raw_download_str.tmp
echo Downloading: '%download_url%' ...
%curl% --remote-name --location %download_url%
if %errorlevel% neq 0 (
echo Cannot download latest version
exit /b %errorlevel%
)

for %%i in (%download_url%) do (
set latest_filename=%%~ni%%~xi
)

echo Generating %latest_filename% autoinstall.bat
> autoinstall.bat (
echo "%%~dp0%latest_filename%" /passive
echo exit /b %%errorlevel%%
)

echo Done.
@echo off
"%~dp0..\.tools\busybox.exe" bash "%~dp0create_install.sh"

exit /b %errorlevel%
34 changes: 34 additions & 0 deletions Cryptomator/create_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
dp0="$(realpath "$(dirname "$0")")"
dp0_tools="$dp0/../.tools" && source "$dp0_tools/env_tools.sh"
set -e
cd "$dp0"

api_url='https://api.github.com/repos/cryptomator/cryptomator/releases?per_page=100'
echo Get latest version: "$api_url" ...
download_url=$($curl --silent --location "$api_url" | "$grep" --only-matching '(?<="browser_download_url":\s")[^,]+Cryptomator-[^,]+x64\.msi(?=")' | head -1)
[[ -z "$download_url" ]] && {
echo "Cannot get release version"
exit 1
}

echo "Downloading: $download_url ..."
$curl --location "$download_url" --remote-name

echo Generating autoinstall ...
# shellcheck disable=SC2016
{
printf '#!/bin/bash
cd "$(realpath "$(dirname "$0")")" || exit 1
set -v
msiexec.exe /i "%s" /passive
' "$(basename -- "$download_url")"
} >autoinstall.sh
chmod +x ./autoinstall.sh

{
printf '@echo off
"%%~dp0..\\.tools\\busybox.exe" bash "%%~dp0autoinstall.sh"
exit /b %%errorlevel%%
'
} >autoinstall.bat
41 changes: 0 additions & 41 deletions MSIAfterburnerSetup/create_install.bat

This file was deleted.

Loading