Skip to content

Commit

Permalink
Merge pull request #5 from TimeWarpEngineering/Cramer/2022-10-30/scripts
Browse files Browse the repository at this point in the history
Cramer/2022 10 30/scripts
  • Loading branch information
StevenTCramer authored Oct 30, 2022
2 parents fc1b56e + b8a9651 commit 02a1463
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 21 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ All the HeroIcons wrapped as Blazor components.

![TimeWarp Logo](assets/Logo.png)

All 2299 [heroicons](https://github.com/tailwindlabs/heroicons) wrapped as Blazor components.
All [heroicons](https://github.com/tailwindlabs/heroicons) wrapped as Blazor components.
See and search all at https://heroicons.com/

## Give a Star! :star:
Expand Down Expand Up @@ -46,7 +46,7 @@ You can see the latest NuGet packages from the official [TimeWarp NuGet page](ht
dotnet add package timewarp-heroicons
```

## Unlicense
## License

[![License](https://img.shields.io/github/license/TimeWarpEngineering/timewarp-heroicons?logo=github)](https://unlicense.org)

Expand All @@ -57,6 +57,20 @@ Time is of the essence. Before developing a Pull Request I recommend opening a
Please feel free to make suggestions and help out with the [documentation](https://timewarpengineering.github.io/timewarp-heroicons/).
Please refer to [Markdown](http://daringfireball.net/projects/markdown/) for how to write markdown files.

### Steps to publish NuGet package

* [ ] Clone the [heroicons](https://github.com/tailwindlabs/heroiconsicons) repo.
* [ ] Set the PowerShell variable `$simple_icons` to the path where you cloned the simple-icons repo in the above step. (Add `$simple_icons = "<PATH where you stored the repp>"` to your profile)
* [ ] Ensure your copy of the simple-icons repo is up to date by running (`update.ps1`).
* [ ] Set the Version in `timewarp-simple-icons/source/timewarp-simple-icons/timewarp-simple-icons.csproj` to the same version that is in `simple-icons/package.json`.
* [ ] Transform the cloned [simple-icons](https://github.com/simple-icons/simple-icons) into razor files by running `transform.ps1`.
* [ ] Run the test app to make sure the icons render properly.
* [ ] Update `releases.md`.
* [ ] Commit and push the changes to GitHub.
* [ ] Set the PowerShell variable `$Nuget_Key` value.
* [ ] Publish to NuGet by running `publish.ps1`.
* [ ] Tweet to let people know.

## Contact

Sometimes the github notifications get lost in the shuffle. If you file an [issue](https://github.com/TimeWarpEngineering/timewarp-heroicons/issues) and don't get a response in a timely manner feel free to ping on our [Discord server](https://discord.gg/A55JARGKKP).
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"scripts": {
"update": "pwsh -c ./scripts/update.ps1",
"transform": "pwsh -c ./scripts/transform.ps1",
"publish": "pwsh -c ./scripts/publish.ps1",
"publish": "./scripts/publish.ps1"
}
}
11 changes: 11 additions & 0 deletions releases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Releases

## 2.0.12-update.1

* Changed from ComponentBase to IComponent ( Thanks @chan18 )
* Updated PowerShell scripts
* Released as update since we already used the version number and Heroicons has not updated

## 2.0.12+build-1

* Original release
6 changes: 5 additions & 1 deletion scripts/publish.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
Push-Location $PSScriptRoot
Push-Location "$PSScriptRoot/.."
try {
if (!$Nuget_Key) { throw "Nuget_Key is not set"}
dotnet tool restore
dotnet cleanup -y
dotnet pack ./Source/timewarp-heroicons/timewarp-heroicons.csproj -c Release
Push-Location ./Source/timewarp-heroicons/bin/Release
dotnet nuget push **/*.nupkg --source https://api.nuget.org/v3/index.json --api-key $Nuget_Key
Pop-Location
}
finally {
Pop-Location
Expand Down
3 changes: 2 additions & 1 deletion scripts/transform.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Push-Location $PSScriptRoot/../tools/transform
try {
dotnet run --project transform.csproj -- "C:\git\github\tailwindlabs\heroicons\src\20\solid" "C:\git\github\TimeWarpEngineering\timewarp-heroicons\source\timewarp-heroicons\20\solid"
if (!$heroicons) { throw "heroicons should be set to the root path of where you cloned the heroicons repo"}
dotnet run --project transform.csproj -- "$heroicons\src" "$PSScriptRoot\..\source\timewarp-heroicons"
}
finally {
Pop-Location
Expand Down
9 changes: 0 additions & 9 deletions scripts/update-transform-publish.ps1

This file was deleted.

7 changes: 4 additions & 3 deletions scripts/update.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Push-Location $GitHub/tailwindlabs/heroicons
if (!$heroicons) { throw "heroicons should be set to the root path of where you cloned the heroicons repo"}
Push-Location $heroicons
try {
git pull
git pull
}
finally {
Pop-Location
Pop-Location
}
2 changes: 1 addition & 1 deletion source/timewarp-heroicons/timewarp-heroicons.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<PackageTags>timewarp; blazor; icons; tailwind; heroicons</PackageTags>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>Logo.png</PackageIcon>
<Version>2.0.12+build-1</Version>
<Version>2.0.12-update.1</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
5 changes: 2 additions & 3 deletions tests/sample-app/Client/Program.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
namespace sample_app;

using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using sample_app;

namespace sample_app;

public class Program
{
Expand Down

0 comments on commit 02a1463

Please sign in to comment.