Skip to content

Commit

Permalink
feat: use pandoc to generate license.rtf
Browse files Browse the repository at this point in the history
  • Loading branch information
ateoi committed Dec 11, 2023
1 parent d0fc4f9 commit 73c9723
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/reusable-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ jobs:
- name: Install WiX v4
shell: pwsh
run: dotnet tool install --global wix
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Pandoc
shell: pwsh
run: choco install pandoc
- name: Build package
shell: pwsh
run: ./src/Build-Installer.ps1
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ winget install --id DEVCOM.JetBrainsMonoNerdFont

- [WiX v4](https://wixtoolset.org/docs/intro/)
- [GitHub CLI](https://cli.github.com/)
- [Pandoc](https://pandoc.org/)

Install them with the following commands:

```powershell
dotnet tool install --global wix
winget install --id GitHub.cli
winget install --id JohnMacFarlane.Pandoc
```

## Build
Expand Down
1 change: 1 addition & 0 deletions src/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -486,3 +486,4 @@ $RECYCLE.BIN/
Fonts/
Package.wxs
*.zip
License.rtf
2 changes: 2 additions & 0 deletions src/Build-Installer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ $version = $Matches.version
-creplace '(\bVersion=)"[\d.]+"', ('$1"' + $version + '"') `
> $PSScriptRoot\Package.wxs

pandoc -s -i $PSScriptRoot\..\License.txt -o $PSScriptRoot\License.rtf

dotnet build -c Release $PSScriptRoot\JetBrainsMono.wixproj
Binary file removed src/License.rtf
Binary file not shown.

0 comments on commit 73c9723

Please sign in to comment.