Skip to content

Commit

Permalink
Fixed #6 - macOS M1 / M2 is now working
Browse files Browse the repository at this point in the history
  • Loading branch information
sandreas committed Apr 2, 2023
1 parent 660e10b commit ded13b5
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,17 @@ jobs:
run: |
release_name="${{ env.PROJECT_NAME }}-${{ steps.version.outputs.version-without-v }}-${{ matrix.target }}"
release_notes="$(sed 's/%/%25/g;s/\r/%0D/g;' ${{ env.PROJECT_NAME }}/doc/release/release-notes-${{ steps.version.outputs.version }}.md | sed ':a;N;$!ba;s/\n/%0A/g')"
release_config="Release"
echo "::set-output name=release_notes::$release_notes"
sed -i.bak "s/<TargetFramework>net6.0<\/TargetFramework>/<TargetFramework>${{ env.DOTNET_FRAMEWORK }}<\/TargetFramework>/g" ${{ env.PROJECT_PATH }}
if [ "${{ matrix.target }}" == "osx-arm64" ]; then
release_config="Debug"
dotnet publish ${{ env.PROJECT_PATH }} --framework ${{ env.DOTNET_FRAMEWORK }} --runtime "${{ matrix.target }}" -c Release -p:EnableCompressionInSingleFile=false -p:PublishSingleFile=true --self-contained true -p:PublishReadyToRun=true -p:PublishTrimmed=true -o "$release_name"
else
dotnet publish ${{ env.PROJECT_PATH }} --framework ${{ env.DOTNET_FRAMEWORK }} --runtime "${{ matrix.target }}" -c Release -p:PublishSingleFile=true --self-contained true -p:PublishReadyToRun=true -p:PublishTrimmed=true -o "$release_name"
fi
dotnet publish ${{ env.PROJECT_PATH }} --framework ${{ env.DOTNET_FRAMEWORK }} --runtime "${{ matrix.target }}" -c "$release_config" -p:PublishSingleFile=true --self-contained true -p:PublishReadyToRun=true -p:PublishTrimmed=true -o "$release_name"
if [ "${{ matrix.target }}" == "win-x64" ]; then
7z a -tzip "${release_name}.zip" "./${release_name}/tone.exe"
Expand All @@ -98,6 +98,7 @@ jobs:
with:
files: "${{ env.PROJECT_NAME }}-${{ steps.version.outputs.version-without-v }}-${{ matrix.target }}*"
body: "${{ steps.build.outputs.release_notes }}"
prerelease: endsWith(github.ref, 'prerelease')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docker:
Expand Down
2 changes: 1 addition & 1 deletion tone/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
config.UseStrictParsing();
config.CaseSensitivity(CaseSensitivity.None);
config.SetApplicationName("tone");
config.SetApplicationVersion("0.1.4");
config.SetApplicationVersion("0.1.5");
config.ValidateExamples();
config.AddCommand<DumpCommand>("dump")
.WithDescription("dump metadata for files and directories (directories are traversed recursively)")
Expand Down
19 changes: 19 additions & 0 deletions tone/doc/release/release-notes-v0.1.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Release Notes

This release is a bugfix release mainly to fix one important bug, where `tone` did not work on `arm64` Macs.

## Fixed

- `tone` now works on `M1` and `M2` Macs (#6 - thank you @remmycat)

## Setup instructions

`tone` is released as single monolithic binary, so you don't need a setup file or any dependencies (not even a `.NET` runtime). Download the `tone`
release for your platform, extract it and run it via command line. If you need help choosing your download, here are some hints:

- For Windows, only the x64 platform is available... choose `-win-x64.zip`
- For `musl` (an alternative C library) choose your arch prefixed by `musl` (usually this is used in alpine `docker` images and other lightweight distributions)
- For standard Linux (like *Fedora*, *Ubuntu*, etc.), chose your arch without `musl` prefix
- For *macOS* you might need to run `xattr -rd com.apple.quarantine tone` after extracting to remove `quarantine` flag


1 change: 0 additions & 1 deletion tone/tone.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
<PublishReadyToRun>true</PublishReadyToRun>
<!-- compress contents -->

<EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>

<TargetFramework>net6.0</TargetFramework>

Expand Down

0 comments on commit ded13b5

Please sign in to comment.