Skip to content

Commit

Permalink
provide Linux & MacOS binaries
Browse files Browse the repository at this point in the history
update release script
document their availability in readme
  • Loading branch information
lmmarsano committed Apr 17, 2019
1 parent 143de2e commit e348a00
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
6 changes: 5 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Here’s a workaround.
Save the application to a directory in your `PATH`.
```PowerShell
New-Item -Type Directory -Path ~\path | Set-Location
Start-BitsTransfer -Source https://github.com/lmmarsano/alias/releases/latest/download/alias.zip
Start-BitsTransfer -Source https://github.com/lmmarsano/alias/releases/latest/download/alias-win-x64.zip
Expand-Archive -Path alias.zip
Remove-Item -Path alias.zip
[System.Environment]::SetEnvironmentVariable(
Expand All @@ -33,6 +33,8 @@ Remove-Item -Path alias.zip
)
```

x86-64 binaries are also released for [Linux][release-linux] and [MacOS][release-osx].

# Example
In a directory containing the `alias` executable
```PowerShell
Expand Down Expand Up @@ -150,6 +152,8 @@ and running the generated executables.
# To Do
Include file system operations to link/copy/remove the alias executable as configuration mode edits `alias.conf`.

[release-linux]: /lmmarsano/alias/releases/latest/download/alias-linux-x64.txz
[release-osx]: /lmmarsano/alias/releases/latest/download/alias-osx-x64.txz
[dotnet]: https://dotnet.microsoft.com/download/dotnet-core/3.0
[wsl]: https://docs.microsoft.com/en-us/windows/wsl/about
[json]: https://www.json.org/
Expand Down
12 changes: 9 additions & 3 deletions release.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Set-StrictMode -Version Latest
[string]$csproj = [System.Uri]::new([System.IO.Path]::Combine($PSScriptRoot, 'source', 'Alias', 'Alias.csproj'))
try {
[System.Xml.XmlReader]$xmlReader = [System.Xml.XmlReader]::Create($csproj)
Expand All @@ -6,7 +7,12 @@ try {
} finally {
$xmlReader.Dispose()
}
dotnet publish -c Release -o release ./source/Alias
Compress-Archive -Path ./release/* -DestinationPath alias.zip
'win', 'linux', 'osx' | % {
dotnet publish -c Release -r $_-x64 --self-contained false -o release/$_/alias ./source/Alias
}
Compress-Archive -Path ./release/win/alias/* -DestinationPath alias-win-x64.zip
'linux', 'osx' | % {
wsl tar -C ./release/$_ -caf alias-$_-x64.txz .
}
Remove-Item -Path ./release/ -Recurse
wsl ~$env:USERNAME/.local/bin/hub release create -a alias.zip -m $version v$version
wsl ~$env:USERNAME/.local/bin/hub release create -a alias-win-x64.zip\#Windows -a alias-linux-x64.txz\#Linux -a alias-osx-x64.txz\#MacOS -m $version v$version

0 comments on commit e348a00

Please sign in to comment.