mirror of
https://github.com/PepperDash/EssentialsPluginTemplate.git
synced 2026-04-12 03:56:55 +00:00
Compare commits
No commits in common. "1.0.6-alpha-20" and "1.0.6-hotfix-12" have entirely different histories.
1.0.6-alph
...
1.0.6-hotf
5 changed files with 58 additions and 52 deletions
|
|
@ -153,7 +153,7 @@ jobs:
|
||||||
$exclusions = "packages"
|
$exclusions = "packages"
|
||||||
# Trying to get any .json schema files (not currently working)
|
# Trying to get any .json schema files (not currently working)
|
||||||
# Gets any files with the listed extensions.
|
# Gets any files with the listed extensions.
|
||||||
Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include "*.clz", "*.cpz", "*.cplz", "*.nuspec", "*.md" | ForEach-Object {
|
Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include "*.clz", "*.cpz", "*.cplz", "*.nuspec" | ForEach-Object {
|
||||||
$allowed = $true;
|
$allowed = $true;
|
||||||
# Exclude any files in submodules
|
# Exclude any files in submodules
|
||||||
foreach ($exclude in $exclusions) {
|
foreach ($exclude in $exclusions) {
|
||||||
|
|
@ -222,12 +222,22 @@ jobs:
|
||||||
Push_Nuget_Package:
|
Push_Nuget_Package:
|
||||||
needs: Build_Project
|
needs: Build_Project
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
|
env:
|
||||||
|
NUSPECNAME: default
|
||||||
steps:
|
steps:
|
||||||
|
- name: Get nuget File
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
$nuspec_file = Get-ChildItem *.nuspec -recurse
|
||||||
|
echo "NUSPECNAME=$($nuspec_file.BaseName)" >> $GITHUB_ENV
|
||||||
|
echo "NUSPEC_FILE=$($nuspec_file.BaseName)"| Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
- name: Download Build Version Info
|
- name: Download Build Version Info
|
||||||
|
if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate '}}
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: Version
|
name: Version
|
||||||
- name: Set Version Number
|
- name: Set Version Number
|
||||||
|
if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
Get-ChildItem "./Version"
|
Get-ChildItem "./Version"
|
||||||
|
|
@ -237,43 +247,39 @@ jobs:
|
||||||
Remove-Item -Path ./Version/version.txt
|
Remove-Item -Path ./Version/version.txt
|
||||||
Remove-Item -Path ./Version
|
Remove-Item -Path ./Version
|
||||||
- name: Download Build output
|
- name: Download Build output
|
||||||
|
if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: Build
|
name: Build
|
||||||
path: ./
|
path: ./
|
||||||
- name: Unzip Build file
|
- name: Unzip Build file
|
||||||
|
if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
||||||
run: |
|
run: |
|
||||||
Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\
|
Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\
|
||||||
Remove-Item -Path .\*.zip
|
Remove-Item -Path .\*.zip
|
||||||
- name: Copy Files to root & delete output directory
|
- name: Copy Files to root & delete output directory
|
||||||
|
if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
||||||
run: |
|
run: |
|
||||||
Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz")
|
Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz")
|
||||||
Get-ChildItem -Path .\output\* | Copy-Item -Destination .\
|
Get-ChildItem -Path .\output\* | Copy-Item -Destination .\
|
||||||
Remove-Item -Path .\output -Recurse
|
Remove-Item -Path .\output -Recurse
|
||||||
- name: Get nuget File
|
#Pushes to github nuget store
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
$nuspec_file = (Get-ChildItem *.nuspec -recurse).BaseName
|
|
||||||
echo "NUSPEC_FILE=$($nuspec_file)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
||||||
# Pulls the nuget builder packages
|
|
||||||
- name: Add nuget.exe
|
- name: Add nuget.exe
|
||||||
if: "!contains(env.NUSPEC_FILE, 'EssentialsPluginTemplate')"
|
if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
||||||
uses: nuget/setup-nuget@v1
|
uses: nuget/setup-nuget@v1
|
||||||
# Creating nuget Packages
|
|
||||||
- name: Add Github Packages source
|
- name: Add Github Packages source
|
||||||
if: "!contains(env.NUSPEC_FILE, 'EssentialsPluginTemplate')"
|
if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
||||||
run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }}
|
run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Create nuget package
|
# Pushes to nuget gallery, not needed unless publishing publicly
|
||||||
if: "!contains(env.NUSPEC_FILE, 'EssentialsPluginTemplate')"
|
|
||||||
run: nuget pack "./${{ env.NUSPEC_FILE}}.nuspec" -version ${{ env.VERSION }}
|
|
||||||
# Pushes to internal github registry
|
|
||||||
- name: Publish nuget package to Github registry
|
|
||||||
if: "!contains(env.NUSPEC_FILE, 'EssentialsPluginTemplate')"
|
|
||||||
run: nuget push **/*.nupkg -source github
|
|
||||||
# Pushes to nuget gallery
|
|
||||||
- name: Add nuget.org API Key
|
- name: Add nuget.org API Key
|
||||||
if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPEC_FILE, 'EssentialsPluginTemplate')
|
if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
||||||
run: nuget setApiKey ${{ secrets.NUGET_API_KEY }}
|
run: nuget setApiKey ${{ secrets.NUGET_API_KEY }}
|
||||||
|
- name: Create nuget package
|
||||||
|
if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
||||||
|
run: nuget pack "./${{ env.NUSPEC_FILE}}.nuspec" -version ${{ env.VERSION }}
|
||||||
|
- name: Publish nuget package to Github registry
|
||||||
|
if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
||||||
|
run: nuget push **/*.nupkg -source github
|
||||||
- name: Publish nuget package to nuget.org
|
- name: Publish nuget package to nuget.org
|
||||||
if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPEC_FILE, 'EssentialsPluginTemplate')
|
if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
||||||
run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json
|
run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json
|
||||||
|
|
|
||||||
|
|
@ -170,12 +170,22 @@ jobs:
|
||||||
Push_Nuget_Package:
|
Push_Nuget_Package:
|
||||||
needs: Build_Project
|
needs: Build_Project
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
|
env:
|
||||||
|
NUSPECNAME: default
|
||||||
steps:
|
steps:
|
||||||
|
- name: Get nuget File
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
$nuspec_file = Get-ChildItem *.nuspec -recurse
|
||||||
|
echo "NUSPECNAME=$($nuspec_file.BaseName)" >> $GITHUB_ENV
|
||||||
|
echo "NUSPEC_FILE=$($nuspec_file.BaseName)"| Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
- name: Download Build Version Info
|
- name: Download Build Version Info
|
||||||
|
if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate '}}
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: Version
|
name: Version
|
||||||
- name: Set Version Number
|
- name: Set Version Number
|
||||||
|
if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
Get-ChildItem "./Version"
|
Get-ChildItem "./Version"
|
||||||
|
|
@ -185,43 +195,39 @@ jobs:
|
||||||
Remove-Item -Path ./Version/version.txt
|
Remove-Item -Path ./Version/version.txt
|
||||||
Remove-Item -Path ./Version
|
Remove-Item -Path ./Version
|
||||||
- name: Download Build output
|
- name: Download Build output
|
||||||
|
if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: Build
|
name: Build
|
||||||
path: ./
|
path: ./
|
||||||
- name: Unzip Build file
|
- name: Unzip Build file
|
||||||
|
if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
||||||
run: |
|
run: |
|
||||||
Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\
|
Get-ChildItem .\*.zip | Expand-Archive -DestinationPath .\
|
||||||
Remove-Item -Path .\*.zip
|
Remove-Item -Path .\*.zip
|
||||||
- name: Copy Files to root & delete output directory
|
- name: Copy Files to root & delete output directory
|
||||||
|
if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
||||||
run: |
|
run: |
|
||||||
Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz")
|
Remove-Item -Path .\* -Include @("*.cpz","*.md","*.cplz","*.json","*.dll","*.clz")
|
||||||
Get-ChildItem -Path .\output\* | Copy-Item -Destination .\
|
Get-ChildItem -Path .\output\* | Copy-Item -Destination .\
|
||||||
Remove-Item -Path .\output -Recurse
|
Remove-Item -Path .\output -Recurse
|
||||||
- name: Get nuget File
|
#Pushes to github nuget store
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
$nuspec_file = (Get-ChildItem *.nuspec -recurse).BaseName
|
|
||||||
echo "NUSPEC_FILE=$($nuspec_file)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
||||||
# Pulls the nuget builder packages
|
|
||||||
- name: Add nuget.exe
|
- name: Add nuget.exe
|
||||||
if: "!contains(env.NUSPEC_FILE, 'EssentialsPluginTemplate')"
|
if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
||||||
uses: nuget/setup-nuget@v1
|
uses: nuget/setup-nuget@v1
|
||||||
# Creating nuget Packages
|
|
||||||
- name: Add Github Packages source
|
- name: Add Github Packages source
|
||||||
if: "!contains(env.NUSPEC_FILE, 'EssentialsPluginTemplate')"
|
if: ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
||||||
run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }}
|
run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Create nuget package
|
# Pushes to nuget gallery, not needed unless publishing publicly
|
||||||
if: "!contains(env.NUSPEC_FILE, 'EssentialsPluginTemplate')"
|
|
||||||
run: nuget pack "./${{ env.NUSPEC_FILE}}.nuspec" -version ${{ env.VERSION }}
|
|
||||||
# Pushes to internal github registry
|
|
||||||
- name: Publish nuget package to Github registry
|
|
||||||
if: "!contains(env.NUSPEC_FILE, 'EssentialsPluginTemplate')"
|
|
||||||
run: nuget push **/*.nupkg -source github
|
|
||||||
# Pushes to nuget gallery
|
|
||||||
- name: Add nuget.org API Key
|
- name: Add nuget.org API Key
|
||||||
if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPEC_FILE, 'EssentialsPluginTemplate')
|
if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
||||||
run: nuget setApiKey ${{ secrets.NUGET_API_KEY }}
|
run: nuget setApiKey ${{ secrets.NUGET_API_KEY }}
|
||||||
|
- name: Create nuget package
|
||||||
|
if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
||||||
|
run: nuget pack "./${{ env.NUSPEC_FILE}}.nuspec" -version ${{ env.VERSION }}
|
||||||
|
- name: Publish nuget package to Github registry
|
||||||
|
if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
||||||
|
run: nuget push **/*.nupkg -source github
|
||||||
- name: Publish nuget package to nuget.org
|
- name: Publish nuget package to nuget.org
|
||||||
if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && !contains(env.NUSPEC_FILE, 'EssentialsPluginTemplate')
|
if: github.repository_owner == 'PepperDash' && github.repository_visibility == 'public' && ${{ env.NUSPECNAME != 'PDT.EssentialsPluginTemplate' }}
|
||||||
run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json
|
run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json
|
||||||
|
|
|
||||||
20
README.md
20
README.md
|
|
@ -1,6 +1,4 @@
|
||||||

|
# Essentials Plugin Template (c) 2020
|
||||||
|
|
||||||
# Essentials Plugin Template (c) 2023
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|
@ -31,7 +29,6 @@ The [Essentials](https://github.com/PepperDash/Essentials) libraries are require
|
||||||
|
|
||||||
To install dependencies once nuget.exe is installed, run the following command from the root directory of your repository:
|
To install dependencies once nuget.exe is installed, run the following command from the root directory of your repository:
|
||||||
`nuget install .\packages.config -OutputDirectory .\packages -excludeVersion`.
|
`nuget install .\packages.config -OutputDirectory .\packages -excludeVersion`.
|
||||||
Alternatively, you can simply run the `GetPackages.bat` file.
|
|
||||||
To verify that the packages installed correctly, open the plugin solution in your repo and make sure that all references are found, then try and build it.
|
To verify that the packages installed correctly, open the plugin solution in your repo and make sure that all references are found, then try and build it.
|
||||||
|
|
||||||
### Installing Different versions of PepperDash Core
|
### Installing Different versions of PepperDash Core
|
||||||
|
|
@ -40,7 +37,7 @@ If you need a different version of PepperDash Core, use the command `nuget insta
|
||||||
|
|
||||||
### Instructions for Renaming Solution and Files
|
### Instructions for Renaming Solution and Files
|
||||||
|
|
||||||
See the Task List in Visual Studio for a guide on how to start using the template. There is extensive inline documentation and examples as well.
|
See the Task List in Visual Studio for a guide on how to start using the templage. There is extensive inline documentation and examples as well.
|
||||||
|
|
||||||
For renaming instructions in particular, see the XML `remarks` tags on class definitions
|
For renaming instructions in particular, see the XML `remarks` tags on class definitions
|
||||||
|
|
||||||
|
|
@ -48,13 +45,10 @@ For renaming instructions in particular, see the XML `remarks` tags on class def
|
||||||
|
|
||||||
## Generating Nuget Package
|
## Generating Nuget Package
|
||||||
|
|
||||||
In the solution folder is a file named "PDT.EssentialsPluginTemplate.nuspec"
|
In the solution folder is a file named "PDT.EssentialsPluginTemplate.nuspec-TEMPLATE"
|
||||||
|
|
||||||
1. Rename the file to match your plugin solution name
|
1. Remove the -TEMPLATE so that the extention is .nuspec.
|
||||||
2. Edit the file to include your project specifics including
|
2. Rename the file to match your plugin solution name
|
||||||
|
3. Edit the file to include your project specifics including
|
||||||
1. <id>PepperDash.Essentials.Plugin.MakeModel</id> Convention is to use the prefix "PepperDash.Essentials.Plugin" and include the MakeModel of the device.
|
1. <id>PepperDash.Essentials.Plugin.MakeModel</id> Convention is to use the prefix "PepperDash.Essentials.Plugin" and include the MakeModel of the device.
|
||||||
2. <projectUrl>https://github.com/PepperDash/EssentialsPluginTemplate</projectUrl> Change to your url to the project repo
|
2. <projectUrl>https://github.com/PepperDash/EssentialsPluginTemplate</projectUrl> Change to your url to the project repo
|
||||||
|
|
||||||
There is no longer a requirement to adjust workflow files for nuget generation for private and public repositories. This is now handled automatically in the workflow.
|
|
||||||
|
|
||||||
__If you do not make these changes to the nuspec file, the project will not generate a nuget package__
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 41 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 38 KiB |
Loading…
Add table
Add a link
Reference in a new issue