Over the last couple of weeks, we have seen the RegisterPluginAndStartStreamDeck.ps1 and RegisterPluginAndStartStreamDeck.sh files get out of sync or have changes get reverted. This is caused by the scripts being duplicated in both the SamplePlugin and Templates/StreamDeck.PluginsTemplate.Csharp directories.
This proposal centralizes the placement of all scripts into a scripts directory located at the root of the project. For this to work, the following requirements must be met:
[x] No duplication of script files.
[x] SamplePlugin should build from the command line or Visual Studio from a clean clone of the repository.
[x] StreamDeck.PluginTemplate.Csharp nuget package should contain the registration scripts when built.
[x] Developers should be able to install the template locally for testing
[x] Ensure the registration scripts located in the template directory are ignored by git.
To meet these requirements, the following changes are proposed:
All scripts are relocated to a single scripts directory.
SamplePlugin has been modified to include the scripts from the new location.
StreamDeckPluginTemplate.nuspec has been updated to include the scripts on a build.
Both an install.sh|ps1 and uninstall.sh|ps1 scripts are added to the scripts directory to facilitate local development.
I have tested all of these requirements on OSX in both bash and powershell core. But it would be a good idea to have a windows user perform the same tests.
Tests:
Run a dotnet build from the SamplePlugin directory.
Expected Result: build should complete, plugin should be copied to plugin directory and Stream Deck app should be restarted.
Run nuget pack Templates/StreamDeck.PluginTemplate.Csharp/StreamDeckPluginTemplate.nuspec from the root of the repository.
Expected Result: the registration scripts should be included in the build nuget package.
Install the template locally by running ./scripts/install.sh|ps1 from the root of the repository.
Expected Result: The template should install correctly and new projects created with it should execute the scripts as expected.
Uninstall the template locally by running ./scripts/uninstall.sh|ps1.
Expected Result: The template should be cleanly removed.
Note: For test 2, you may need to temporarily edit the nuspec file to have a valid version number.
Fixes #109
Over the last couple of weeks, we have seen the
RegisterPluginAndStartStreamDeck.ps1
andRegisterPluginAndStartStreamDeck.sh
files get out of sync or have changes get reverted. This is caused by the scripts being duplicated in both theSamplePlugin
andTemplates/StreamDeck.PluginsTemplate.Csharp
directories.This proposal centralizes the placement of all scripts into a
scripts
directory located at the root of the project. For this to work, the following requirements must be met:SamplePlugin
should build from the command line or Visual Studio from a clean clone of the repository.StreamDeck.PluginTemplate.Csharp
nuget package should contain the registration scripts when built.To meet these requirements, the following changes are proposed:
scripts
directory.SamplePlugin
has been modified to include the scripts from the new location.StreamDeckPluginTemplate.nuspec
has been updated to include the scripts on a build.install.sh|ps1
anduninstall.sh|ps1
scripts are added to the scripts directory to facilitate local development.I have tested all of these requirements on OSX in both
bash
andpowershell core
. But it would be a good idea to have a windows user perform the same tests.Tests:
dotnet build
from theSamplePlugin
directory.nuget pack Templates/StreamDeck.PluginTemplate.Csharp/StreamDeckPluginTemplate.nuspec
from the root of the repository../scripts/install.sh|ps1
from the root of the repository../scripts/uninstall.sh|ps1
.Note: For test 2, you may need to temporarily edit the nuspec file to have a valid version number.