Skip to content

Commit

Permalink
Update release script
Browse files Browse the repository at this point in the history
  • Loading branch information
fvanroie committed May 22, 2021
1 parent 0942c4e commit 8617111
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ jobs:
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: bin\MqttClient_.rmskin
asset_name: MqttClient_.rmskin
file: bin\MqttClient_*.rmskin
tag: ${{ github.ref }}
overwrite: true
file_glob: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ M2Mqtt/.vs/
MqttPlugin/.vs/
[Rr]eleases/
BuildTools/
!BuildTools/Build-RainmeterSkin.ps1
.editorconfig

# User-specific files
Expand Down
10 changes: 5 additions & 5 deletions BuildTools/Build-RainmeterSkin.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ Add-Type -AssemblyName System.IO.Compression.FileSystem
$SkinsDir = Get-Item (join-path -Path $SolutionDir -ChildPath "examples")
$SkinsRegex = [regex]::Escape($SkinsDir.Fullname)

$version = ''
$version = '0.2.5.0522'
$skinfile = $SolutionDir + "bin\MqttClient_$version.rmskin"

#Create RMSKIN.ini
Set-Content -Path "$SolutionDir\bin\RMSKIN.ini" -Value "[rmskin]`nName=MqttPlugin`nAuthor=NetwiZe.be`nVersion=0.2.5.0522`nMinimumRainmeter=4.3.1.3321`nMinimumWindows=10.0"
Set-Content -Path "$SolutionDir\bin\RMSKIN.ini" -Value "[rmskin]`nName=MqttPlugin`nAuthor=NetwiZe.be`nVersion=$version`nMinimumRainmeter=4.3.1.3321`nMinimumWindows=10.0"

# Delete Rmskin file if it exists
if (Test-Path $skinfile) { Remove-Item $skinfile }
Expand All @@ -34,17 +34,17 @@ $entries = @()
$entries += Get-ChildItem -File ("$SkinsDir") -Recurse |
Sort-Object DirectoryName, FullName |
% {
$shortName = $_.FullName -replace $SkinsRegex,"Skins\MqttClient"
$shortName = $_.FullName -replace $SkinsRegex, "Skins\MqttClient"
[System.IO.Compression.ZipFileExtensions]::CreateEntryFromFile($rmskin, $_.FullName, $shortName, 'optimal')
}

# Add Plugins
$dllfile = $Targetpath -replace "x64","x86"
$dllfile = $Targetpath -replace "x64", "x86"
if (Test-Path $dllfile) {
$entries += [System.IO.Compression.ZipFileExtensions]::CreateEntryFromFile($rmskin, $dllfile, 'Plugins\32bit\MqttClient.dll', 'optimal')
}

$dllfile = $Targetpath -replace "x86","x64"
$dllfile = $Targetpath -replace "x86", "x64"
if (Test-Path $dllfile) {
$entries += [System.IO.Compression.ZipFileExtensions]::CreateEntryFromFile($rmskin, $dllfile, 'Plugins\64bit\MqttClient.dll', 'optimal')
}
Expand Down

0 comments on commit 8617111

Please sign in to comment.