Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Create dotnet 'tool' to help with running Squirrel #57

Closed
caesay opened this issue Mar 3, 2022 · 3 comments
Closed

Create dotnet 'tool' to help with running Squirrel #57

caesay opened this issue Mar 3, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@caesay
Copy link
Member

caesay commented Mar 3, 2022

A few people have asked for this, but I was not sure how to implement it initially.

The main difficulty is that we want to use the same version of Squirrel.exe that you have installed via a nuget package in your project, so I did not want to ship Squirrel.exe separately.

I can't believe I missed the most obvious solution - which is that the dotnet tool can just be a "stub" which reads the solution/project dependencies in the current working dir, determines what version(s) of Squirrel is installed in the project, locate it in %userprofile% and then just forward all of it's arguments to the correct version of Squirrel.exe.

@caesay caesay added the enhancement New feature or request label Mar 3, 2022
@mungojam
Copy link

Neat idea

By the way, I made our own internal wrapper of squirrel (the original for now) that handles this a different way and does bundle a separate version of the squirrel tool. The benefit is that we can use it as part of our non .net builds by simply adding it as a .net local tool. It's probably a bit niche so not worth worrying about.

I plan to port our wrapper to your great fork and try and contribute some things back assuming I get approval to do so 🙂

@caesay
Copy link
Member Author

caesay commented Apr 13, 2022

@mungojam Neat idea. the dotnet tool can ship a version of Squirrel.exe - in the case that the current directory is not a dotnet solution/project, or the correct version of Squirrel can't be found in %userprofile%, the embedded version can be used.

Definitely happy to accept any contributions back. There have been a great many improvements and architectural changes in this fork (over 300 commits) so feel free to hop in my Discord channel (link on main readme) if you'd like to chat about any changes made, or any ideas you have for future improvement!

@caesay
Copy link
Member Author

caesay commented May 23, 2022

This has been delivered in a 3.0.0 unstable release. There is a new dotnet tool csq which is cross platform and is capable of creating Squirrel releases.

  • It is cross platform, and can also cross-compile (eg. create windows releases on macos or vice versa)
  • It will always create releases using the correct version of the Squirrel release generator (based on the version of the Clowd.Squirrel nuget package installed in the current working dir)
  • It also contains a bundled version of the Squirrel release generator (eg. if the current working dir does not have Clowd.Squirrel, or is not a dotnet project)
  • csq is backwards compatible, and supports locating and forwarding arguments to a Squirrel.exe binary from v2.x (only on windows)

A unstable package is published to nuget, to reserve the package ID. It should be fine to use with an older Squirrel version (eg. 2.x) but I would advise against 3.x being used in any production applications.

@caesay caesay closed this as completed May 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants