From 8c4b48e1b8a986857eefe67507d6fd8fea21745c Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Thu, 13 Feb 2020 16:05:48 -0700 Subject: [PATCH 01/18] Updates Readme.md Basic info and link to main docs --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2e77fe0..4dbf147 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,9 @@ -# PDT.EssentialsPluginTemplate.EPI +# Essentials Plugin Template (c) 2020 + +## License +Provided under MIT license + +## Overview + +Fork this repo when creating a new plugin for Essentials. For more information about plugins, refer to the Essentials Wiki [Plugins](https://github.com/PepperDash/Essentials/wiki/Plugins) article. From ddd394e0a5281fef0fba0cf1b828d835d4e1d079 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Wed, 26 Feb 2020 08:59:25 -0700 Subject: [PATCH 02/18] Create .gitignore --- .gitignore | 353 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 353 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..611428f --- /dev/null +++ b/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*[.json, .xml, .info] + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ From 13fad8166a2412f599290da37ec163ba24ba77a6 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Wed, 26 Feb 2020 10:45:18 -0700 Subject: [PATCH 03/18] Added .clz & .cplz to .gitignore --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 611428f..e8d2744 100644 --- a/.gitignore +++ b/.gitignore @@ -351,3 +351,7 @@ MigrationBackup/ # Ionide (cross platform F# VS Code tools) working folder .ionide/ + +# Crestron Zip Files +*.cplz +*.clz From 0a6c163beff1c9d29e00770b14ff564c59d6c0ad Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Mon, 23 Mar 2020 13:05:30 -0600 Subject: [PATCH 04/18] adds docker build action --- .github/ISSUE_TEMPLATE/bug_report.md | 34 ++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 21 +++++ .github/scripts/GenerateVersionNumber.ps1 | 38 +++++++++ .github/scripts/UpdateAssemblyVersion.ps1 | 40 ++++++++++ .github/scripts/ZipBuildOutput.ps1 | 41 ++++++++++ .github/workflows/docker.yml | 96 +++++++++++++++++++++++ 6 files changed, 270 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/scripts/GenerateVersionNumber.ps1 create mode 100644 .github/scripts/UpdateAssemblyVersion.ps1 create mode 100644 .github/scripts/ZipBuildOutput.ps1 create mode 100644 .github/workflows/docker.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..c969d2a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,34 @@ +--- +name: Bug report +about: Create a report to help us improve +title: "[BUG]-" +labels: bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**Stacktrace** + +Include a stack trace of the exception if possible. +``` +Paste stack trace here +``` + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..0a854e7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,21 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: "[FEATURE]-" +labels: enhancement +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] +If this is a request for support for a new device or type, be as specific as possible and include any pertinent manufacturer and model information. + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/scripts/GenerateVersionNumber.ps1 b/.github/scripts/GenerateVersionNumber.ps1 new file mode 100644 index 0000000..d05aecd --- /dev/null +++ b/.github/scripts/GenerateVersionNumber.ps1 @@ -0,0 +1,38 @@ +$latestVersions = $(git tag --merged origin/master) +$latestVersion = [version]"0.0.0" +Foreach ($version in $latestVersions) { + Write-Host $version + try { + if (([version]$version) -ge $latestVersion) { + $latestVersion = $version + Write-Host "Setting latest version to: $latestVersion" + } + } catch { + Write-Host "Unable to convert $($version). Skipping" + continue; + } +} + +$newVersion = [version]$latestVersion +$phase = "" +$newVersionString = "" +switch -regex ($Env:GITHUB_REF) { + '^refs\/heads\/master*.' { + $newVersionString = "{0}.{1}.{2}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1) + } + '^refs\/heads\/feature\/*.' { + $phase = 'alpha' + } + '^refs\/heads\/release\/*.' { + $phase = 'rc' + } + '^refs\/heads\/development*.' { + $phase = 'beta' + } + '^refs\/heads\/hotfix\/*.' { + $phase = 'hotfix' + } +} +$newVersionString = "{0}.{1}.{2}-{3}-{4}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1), $phase, $Env:GITHUB_RUN_NUMBER + +Write-Output $newVersionString diff --git a/.github/scripts/UpdateAssemblyVersion.ps1 b/.github/scripts/UpdateAssemblyVersion.ps1 new file mode 100644 index 0000000..e52b31e --- /dev/null +++ b/.github/scripts/UpdateAssemblyVersion.ps1 @@ -0,0 +1,40 @@ +function Update-SourceVersion { + Param ([string]$Version) + #$fullVersion = $Version + $baseVersion = [regex]::Match($Version, "(\d+.\d+.\d+).*").captures.groups[1].value + $NewAssemblyVersion = ‘AssemblyVersion("‘ + $baseVersion + ‘.*")’ + Write-Output "AssemblyVersion = $NewAssemblyVersion" + $NewAssemblyInformationalVersion = ‘AssemblyInformationalVersion("‘ + $Version + ‘")’ + Write-Output "AssemblyInformationalVersion = $NewAssemblyInformationalVersion" + + foreach ($o in $input) { + Write-output $o.FullName + $TmpFile = $o.FullName + “.tmp” + get-content $o.FullName | + ForEach-Object { + $_ -replace ‘AssemblyVersion\(".*"\)’, $NewAssemblyVersion } | + ForEach-Object { + $_ -replace ‘AssemblyInformationalVersion\(".*"\)’, $NewAssemblyInformationalVersion + } > $TmpFile + move-item $TmpFile $o.FullName -force + } +} + +function Update-AllAssemblyInfoFiles ( $version ) { + foreach ($file in “AssemblyInfo.cs”, “AssemblyInfo.vb” ) { + get-childitem -Path $Env:GITHUB_WORKSPACE -recurse | Where-Object { $_.Name -eq $file } | Update-SourceVersion $version ; + } +} + +# validate arguments +$r = [System.Text.RegularExpressions.Regex]::Match($args[0], "\d+\.\d+\.\d+.*"); +if ($r.Success) { + Write-Output "Updating Assembly Version to $args ..."; + Update-AllAssemblyInfoFiles $args[0]; +} +else { + Write-Output ” “; + Write-Output “Error: Input version does not match x.y.z format!” + Write-Output ” “; + Write-Output "Unable to apply version to AssemblyInfo.cs files"; +} diff --git a/.github/scripts/ZipBuildOutput.ps1 b/.github/scripts/ZipBuildOutput.ps1 new file mode 100644 index 0000000..3f1998b --- /dev/null +++ b/.github/scripts/ZipBuildOutput.ps1 @@ -0,0 +1,41 @@ +# Uncomment these for local testing +# $Env:GITHUB_WORKSPACE = "C:\Working Directories\PD\essentials" +# $Env:SOLUTION_FILE = "PepperDashEssentials" +# $Env:VERSION = "0.0.0-buildType-test" + +# Sets the root directory for the operation +$destination = "$($Env:GITHUB_HOME)\output" +New-Item -ItemType Directory -Force -Path ($destination) +Get-ChildItem ($destination) +$exclusions = @(git submodule foreach --quiet 'echo $name') +# Trying to get any .json schema files (not currently working) +# Gets any files with the listed extensions. +Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include "*.clz", "*.cpz", "*.cplz" | ForEach-Object { + $allowed = $true; + # Exclude any files in submodules + foreach ($exclude in $exclusions) { + if ((Split-Path $_.FullName -Parent).contains("$($exclude)")) { + $allowed = $false; + break; + } + } + if ($allowed) { + Write-Host "allowing $($_)" + $_; + } +} | Copy-Item -Destination ($destination) -Force +Write-Host "Getting matching files..." +# Get any files from the output folder that match the following extensions +Get-ChildItem -Path $destination | Where-Object {($_.Extension -eq ".clz") -or ($_.Extension -eq ".cpz" -or ($_.Extension -eq ".cplz"))} | ForEach-Object { + # Replace the extensions with dll and xml and create an array + $filenames = @($($_ -replace "cpz|clz|cplz", "dll"), $($_ -replace "cpz|clz|cplz", "xml")) + Write-Host "Filenames:" + Write-Host $filenames + if ($filenames.length -gt 0) { + # Attempt to get the files and return them to the output directory + Get-ChildItem -Recurse -Path "$($Env:GITHUB_WORKSPACE)" -include $filenames | Copy-Item -Destination ($destination) -Force + } +} +Compress-Archive -Path $destination -DestinationPath "$($Env:GITHUB_WORKSPACE)\$($Env:SOLUTION_FILE)-$($Env:VERSION).zip" -Force +Write-Host "Output Contents post Zip" +Get-ChildItem -Path $destination \ No newline at end of file diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..50a6664 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,96 @@ +name: Branch Build Using Docker + +on: + push: + branches: + - feature/* + - hotfix/* + - release/* + - master + - development + +env: + # solution path doesn't need slashes unless there it is multiple folders deep + # solution name does not include extension. .sln is assumed + SOLUTION_PATH: PDT.EssentialsPluginTemplate.EPI + SOLUTION_FILE: PDT.EssentialsPluginTemplate.EPI + # Do not edit this, we're just creating it here + VERSION: 0.0.0-buildtype-buildnumber + # Defaults to debug for build type + BUILD_TYPE: Debug + # Defaults to master as the release branch. Change as necessary + RELEASE_BRANCH: master +jobs: + Build_Project: + runs-on: windows-latest + steps: + # First we checkout the source repo + - name: Checkout repo + uses: actions/checkout@v2 + with: + fetch-depth: 0 + # And any submodules + - name: Checkout submodules + shell: bash + run: | + git config --global url."https://github.com/".insteadOf "git@github.com:" + auth_header="$(git config --local --get http.https://github.com/.extraheader)" + git submodule sync --recursive + git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 + # Set the BUILD_TYPE environment variable + - name: Set Build to Release if triggered from Master + run: | + if("$($Env:GITHUB_REF)".contains("$($Env:RELEASE_BRANCH)")) { + Write-Host "Setting build type to Release" + Write-Output "::set-env name=BUILD_TYPE::Release" + } + # Fetch all tags + - name: Fetch tags + run: git fetch --tags + # Generate the appropriate version number + - name: Set Version Number + shell: powershell + run: | + $version = ./.github/scripts/GenerateVersionNumber.ps1 + Write-Output "::set-env name=VERSION::$version" + # Use the version number to set the version of the assemblies + - name: Update AssemblyInfo.cs + shell: powershell + run: | + Write-Output ${{ env.VERSION }} + ./.github/scripts/UpdateAssemblyVersion.ps1 ${{ env.VERSION }} + # Build the solutions in the docker image + - name: Build Solution + shell: powershell + run: | + Invoke-Expression "docker run --rm --mount type=bind,source=""$($Env:GITHUB_WORKSPACE)"",target=""c:/project"" pepperdash/sspbuilder c:\cihelpers\vsidebuild.exe -Solution ""c:\project\$($Env:SOLUTION_FILE).sln"" -BuildSolutionConfiguration $($ENV:BUILD_TYPE)" + # Zip up the output files as needed + - name: Zip Build Output + shell: powershell + run: ./.github/scripts/ZipBuildOutput.ps1 + - name: Upload Build Output + uses: actions/upload-artifact@v1 + with: + name: Build + path: ./${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip + # Create the release on the source repo + - name: Create Release + id: create_release + uses: actions/create-release@v1 + with: + tag_name: ${{ env.VERSION }} + release_name: ${{ env.VERSION }} + prerelease: ${{contains('debug', env.BUILD_TYPE)}} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Upload the build package to the release + - name: Upload Release Package + id: upload_release + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip + asset_name: ${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip + asset_content_type: application/zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 498248fcc42c94a5ccd9210bb688cd18c0432d4a Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Mon, 23 Mar 2020 13:20:13 -0600 Subject: [PATCH 05/18] fixes path for solution file to match existing path --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 50a6664..08c269d 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -63,7 +63,7 @@ jobs: - name: Build Solution shell: powershell run: | - Invoke-Expression "docker run --rm --mount type=bind,source=""$($Env:GITHUB_WORKSPACE)"",target=""c:/project"" pepperdash/sspbuilder c:\cihelpers\vsidebuild.exe -Solution ""c:\project\$($Env:SOLUTION_FILE).sln"" -BuildSolutionConfiguration $($ENV:BUILD_TYPE)" + Invoke-Expression "docker run --rm --mount type=bind,source=""$($Env:GITHUB_WORKSPACE)"",target=""c:/project"" pepperdash/sspbuilder c:\cihelpers\vsidebuild.exe -Solution ""c:\project\$($Env:SOLUTION_PATH)\$($Env:SOLUTION_FILE).sln"" -BuildSolutionConfiguration $($ENV:BUILD_TYPE)" # Zip up the output files as needed - name: Zip Build Output shell: powershell From b2d7c9d2463ac4dfd1de0140544257fc12d4b725 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Mon, 23 Mar 2020 13:22:11 -0600 Subject: [PATCH 06/18] updates readme.md to include info about the action --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4dbf147..cf43abd 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ # Essentials Plugin Template (c) 2020 ## License + Provided under MIT license ## Overview -Fork this repo when creating a new plugin for Essentials. For more information about plugins, refer to the Essentials Wiki [Plugins](https://github.com/PepperDash/Essentials/wiki/Plugins) article. +Fork this repo when creating a new plugin for Essentials. For more information about plugins, refer to the Essentials Wiki [Plugins](https://github.com/PepperDash/Essentials/wiki/Plugins) article. +This repo contains a Github Action workflow that will build this project automatically. Modify the SOLUTION_PATH and SOLUTION_FILE environment variables as needed. From 057c2cfca97c4c0783a1e287e6028c40242bdab1 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 24 Mar 2020 10:51:28 -0600 Subject: [PATCH 07/18] removed message in readme about action --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index cf43abd..4cc9045 100644 --- a/README.md +++ b/README.md @@ -7,5 +7,3 @@ Provided under MIT license ## Overview Fork this repo when creating a new plugin for Essentials. For more information about plugins, refer to the Essentials Wiki [Plugins](https://github.com/PepperDash/Essentials/wiki/Plugins) article. - -This repo contains a Github Action workflow that will build this project automatically. Modify the SOLUTION_PATH and SOLUTION_FILE environment variables as needed. From f0617f21166d5a80720db85d813ae84aa152db5c Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Thu, 20 Aug 2020 10:31:17 -0600 Subject: [PATCH 08/18] update submodule to 1.6.1 --- EssentialsBuilds | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EssentialsBuilds b/EssentialsBuilds index 855dccd..e29501b 160000 --- a/EssentialsBuilds +++ b/EssentialsBuilds @@ -1 +1 @@ -Subproject commit 855dccd0d41aac272512f58d6bcd4764307bbb14 +Subproject commit e29501be5df2c587d1b6221e60565e38d21e369d From 05ba06661c5bfc636756f0512df8d46780a6fa8b Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Thu, 20 Aug 2020 10:31:33 -0600 Subject: [PATCH 09/18] Update Join map and bridging methods --- .../EssentialsPluginTemplateBridge.cs | 57 ------------------- .../EssentialsPluginTemplateJoinMap.cs | 27 +++++++++ 2 files changed, 27 insertions(+), 57 deletions(-) delete mode 100644 PDT.EssentialsPluginTemplate.EPI/EssentialsPluginTemplateBridge.cs create mode 100644 PDT.EssentialsPluginTemplate.EPI/EssentialsPluginTemplateJoinMap.cs diff --git a/PDT.EssentialsPluginTemplate.EPI/EssentialsPluginTemplateBridge.cs b/PDT.EssentialsPluginTemplate.EPI/EssentialsPluginTemplateBridge.cs deleted file mode 100644 index e26e2d7..0000000 --- a/PDT.EssentialsPluginTemplate.EPI/EssentialsPluginTemplateBridge.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Bridges; - -using Newtonsoft.Json; - -namespace EssentialsPluginTemplateEPI -{ - public static class EssentialsPluginTemplateBridge - { - public static void LinkToApiExt(this EssentialsPluginFactory DspDevice, BasicTriList trilist, uint joinStart, string joinMapKey) - { - // Construct the default join map - EssentialsPluginTemplateBridgeJoinMap joinMap = new EssentialsPluginTemplateBridgeJoinMap(); - - // Attempt to get a custom join map if specified in config - var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey); - - // If we find a custom join map, deserialize it - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - // Offset the joins based on the join start - joinMap.OffsetJoinNumbers(joinStart); - - - // Set all your join actions here - - - // Link all your feedbacks to joins here - - } - } - public class EssentialsPluginTemplateBridgeJoinMap : JoinMapBase - { - // Specify your joins here - - - public EssentialsPluginTemplateBridgeJoinMap() - { - // Set the values of your joins here - } - - public override void OffsetJoinNumbers(uint joinStart) - { - // Offset the joins from joinStart as applicable - } - } -} \ No newline at end of file diff --git a/PDT.EssentialsPluginTemplate.EPI/EssentialsPluginTemplateJoinMap.cs b/PDT.EssentialsPluginTemplate.EPI/EssentialsPluginTemplateJoinMap.cs new file mode 100644 index 0000000..4272a97 --- /dev/null +++ b/PDT.EssentialsPluginTemplate.EPI/EssentialsPluginTemplateJoinMap.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using PepperDash.Essentials.Core; + +namespace PDT.EssentialsPluginTemplate.EPI +{ + public class EssentialsPluginTemplateBridgeJoinMap : JoinMapBaseAdvanced + { + [JoinName("IsOnline")] + public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData {JoinNumber = 1, JoinSpan = 1}, + new JoinMetadata + { + Description = "Device is Online", + JoinType = eJoinType.Digital, + JoinCapabilities = eJoinCapabilities.ToSIMPL + }); + + + public EssentialsPluginTemplateBridgeJoinMap(uint joinStart):base(joinStart, typeof(EssentialsPluginTemplateBridgeJoinMap)) + { + + } + } +} \ No newline at end of file From d590987143d0e60232b2d2fc582e2efe9bb433d3 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Thu, 20 Aug 2020 10:33:20 -0600 Subject: [PATCH 10/18] stop tracking .projectinfo files --- .gitignore | 1 + .../PDT.EssentialsPluginTemplate.projectinfo | Bin 1891 -> 0 bytes 2 files changed, 1 insertion(+) delete mode 100644 PDT.EssentialsPluginTemplate.EPI/PDT.EssentialsPluginTemplate.projectinfo diff --git a/.gitignore b/.gitignore index e8d2744..314b11b 100644 --- a/.gitignore +++ b/.gitignore @@ -355,3 +355,4 @@ MigrationBackup/ # Crestron Zip Files *.cplz *.clz +*.projectinfo diff --git a/PDT.EssentialsPluginTemplate.EPI/PDT.EssentialsPluginTemplate.projectinfo b/PDT.EssentialsPluginTemplate.EPI/PDT.EssentialsPluginTemplate.projectinfo deleted file mode 100644 index acdbdf8f5cab1846af2602a290df71e42cfcb017..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1891 zcmV-p2b}mHiwFP!000040PVd8U>r%7B_=Oz%6orG^-9;^bfE}=m|e(^`YTQU3S(MP)yS?+^(asLFn^U`!N5Ajy``xO3TP!cqr$wDl+o~?|=J)-5Uq1bPf8QY# z@a<*VjUqu%Dh(tLr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Qd2Zqvx?8~g24?2}3kka2PL{y=CNJ`rNAP4k`EeSc0iKno@1W|;3a9~=7pfAL)Gb&>#X6tD90 z5=)oW@@(1WHK-C!N`CMB{2-rACfULMbUJ%Li;9zn4-fY9Pao_b987||+HJrFvvUjJ zUvqYb5%_=YG|@D5Vt+TB*FW+6+j&WvU|^Qccc%Au?$2iVbas$EI3S;OLf-4{1JXFt z$>hPnEDb^pCg~Qizvd(j_W%FpIqHP`ZZvO-MP8p?QjY_ZL@w)ekJ2Ukw8Azar|JRa zQyxw~{q+2RQeOKHf`x|LfDLBp7QnyeEDa;@|GsJJd|)T7lK^modz!V`c$T$pmJarI zCZFz3_bGjn?M-R02YU}Gg_6%mL*0AuVCv7(tw{Nvl<&~hUxtpL?J;I2lI}Mi&+^)h zb3%dD-osDtPj`0CDdx>-1?qlIN!T44Fxkuhca4)#_r}@@P5*y6pPi8J|A+JW{a^A+ dMj!oTUKi)OLP@f_E?W`h{|6>OXZsH)007@ Date: Thu, 20 Aug 2020 10:40:28 -0600 Subject: [PATCH 11/18] update to new plugin factory method --- .../EssentailsPluginTemplate.cs | 52 ------------------- .../EssentailsPluginTemplateFactory.cs | 43 +++++++++++++++ .../EssentialsPluginTemplateDevice.cs | 39 +++++++++----- 3 files changed, 69 insertions(+), 65 deletions(-) delete mode 100644 PDT.EssentialsPluginTemplate.EPI/EssentailsPluginTemplate.cs create mode 100644 PDT.EssentialsPluginTemplate.EPI/EssentailsPluginTemplateFactory.cs diff --git a/PDT.EssentialsPluginTemplate.EPI/EssentailsPluginTemplate.cs b/PDT.EssentialsPluginTemplate.EPI/EssentailsPluginTemplate.cs deleted file mode 100644 index 0112c01..0000000 --- a/PDT.EssentialsPluginTemplate.EPI/EssentailsPluginTemplate.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using Crestron.SimplSharp; // For Basic SIMPL# Classes -using Crestron.SimplSharpPro; // For Basic SIMPL#Pro classes - -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; - -using PepperDash.Essentials; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; -using PepperDash.Core; - -namespace EssentialsPluginTemplateEPI -{ - /// - /// This class contains the necessary properties and static methods required to function as an Essentials Plugin - /// - public class EssentialsPluginFactory - { - /// - /// This string is used to define the minimum version of the - /// Essentials Framework required for this plugin - /// - public static string MinimumEssentialsFrameworkVersion = "1.4.31"; - - /// - /// This method will get called by Essentials when this plugin is loaded. - /// Use it to add factory methods for all new Device types defined in this plugin - /// - public static void LoadPlugin() - { - PepperDash.Essentials.Core.DeviceFactory.AddFactoryForType("EssentialsPluginTemplate", EssentialsPluginFactory.BuildDevice); - - // Add additional factories for each type here - } - - /// - /// Builds an instance of the device type. There should be method like this defined for each device type your plugin needs - /// to be able to build - /// - /// The device configuration - /// The device - public static EssentialsPluginTemplateDevice BuildDevice(DeviceConfig dc) - { - var config = JsonConvert.DeserializeObject(dc.Properties.ToString()); - var newDevice = new EssentialsPluginTemplateDevice(dc.Key, dc.Name, config); - return newDevice; - } - - } -} - diff --git a/PDT.EssentialsPluginTemplate.EPI/EssentailsPluginTemplateFactory.cs b/PDT.EssentialsPluginTemplate.EPI/EssentailsPluginTemplateFactory.cs new file mode 100644 index 0000000..79cfcf9 --- /dev/null +++ b/PDT.EssentialsPluginTemplate.EPI/EssentailsPluginTemplateFactory.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using Crestron.SimplSharp; // For Basic SIMPL# Classes +using Crestron.SimplSharpPro; // For Basic SIMPL#Pro classes + +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; + +using PepperDash.Essentials; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Config; +using PepperDash.Core; + +namespace EssentialsPluginTemplateEPI +{ + /// + /// This class contains the necessary properties and methods required to function as an Essentials Plugin + /// + public class EssentialsPluginFactory:EssentialsPluginDeviceFactory + { + public EssentialsPluginFactory() + { + // This string is used to define the minimum version of the + // Essentials Framework required for this plugin + MinimumEssentialsFrameworkVersion = "1.6.1"; + + //The strings defined in this list will be used in the configuration file to build the device in this plugin. + TypeNames = new List {"essentialsPluginTemplateDevice"}; + } + + #region Overrides of EssentialsDeviceFactory + + public override EssentialsDevice BuildDevice(DeviceConfig dc) + { + var config = dc.Properties.ToObject(); + var newDevice = new EssentialsPluginTemplateDevice(dc.Key, dc.Name, config); + return newDevice; + } + + #endregion + } +} + diff --git a/PDT.EssentialsPluginTemplate.EPI/EssentialsPluginTemplateDevice.cs b/PDT.EssentialsPluginTemplate.EPI/EssentialsPluginTemplateDevice.cs index 9cfcd62..dda96b2 100644 --- a/PDT.EssentialsPluginTemplate.EPI/EssentialsPluginTemplateDevice.cs +++ b/PDT.EssentialsPluginTemplate.EPI/EssentialsPluginTemplateDevice.cs @@ -1,22 +1,16 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Essentials; +using Crestron.SimplSharpPro.DeviceSupport; +using Newtonsoft.Json; +using PDT.EssentialsPluginTemplate.EPI; using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Bridges; using PepperDash.Core; -using PepperDash.Essentials.Bridges; namespace EssentialsPluginTemplateEPI { /// /// Example of a plugin device /// - public class EssentialsPluginTemplateDevice : Device, IBridge + public class EssentialsPluginTemplateDevice : EssentialsDevice, IBridgeAdvanced { /// /// Device Constructor. Called by BuildDevice @@ -46,9 +40,28 @@ namespace EssentialsPluginTemplateEPI /// /// /// - public void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey) + public void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) { - this.LinkToApi(trilist, joinStart, joinMapKey); + // Construct the default join map + var joinMap = new EssentialsPluginTemplateBridgeJoinMap(joinStart); + + // Attempt to get a custom join map if specified in config + var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey); + + // If we find a custom join map, deserialize it + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); + + //Checking if the bridge is null allows for backwards compatability with configurations that use EiscApi instead of EiscApiAdvanced + if (bridge != null) + { + bridge.AddJoinMap(Key, joinMap); + } + + // Set all your join actions here + + + // Link all your feedbacks to joins here } } } \ No newline at end of file From d28108a132eb1673efe1ee3b2a857626d9b4b884 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Thu, 20 Aug 2020 10:40:43 -0600 Subject: [PATCH 12/18] add .suo files to .gitignore --- .gitignore | 1 + .../PDT.EssentialsPluginTemplate.EPI.suo | Bin 22528 -> 23552 bytes 2 files changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 314b11b..f218fa0 100644 --- a/.gitignore +++ b/.gitignore @@ -356,3 +356,4 @@ MigrationBackup/ *.cplz *.clz *.projectinfo +*.suo diff --git a/PDT.EssentialsPluginTemplate.EPI/PDT.EssentialsPluginTemplate.EPI.suo b/PDT.EssentialsPluginTemplate.EPI/PDT.EssentialsPluginTemplate.EPI.suo index ad4bc104a0a3be5928a263b35e941a46b3399a4f..a6dd2adce2666f03d2a07f2d93e749e0acc25d16 100644 GIT binary patch delta 459 zcmZqJz}T>ZaYFzTqt4_&HucFBOd>4W3=9mDCosvd{`>#`|G&)}nRYYsIjmg3E>M1r zkr^oGptiY+rHxsj{6@vg54U_A=0vc$c*(!@n|zSNV6y`UGcPZL5Kx&Q5CaYPKlvhy z%H$GJe_jS@polP%=;kk?=UJE-WhOiN=uiG4=<`9St<{^EItlTl$ZqpUD*B11XQo*ag3AXzl|yt4eH5E+)K zK!;9N2r=QE24qYJ;u%2vZ)4zm#zkRFlN&tb7!80vQ=EK2%7m>QC}qMpd1AO156H(b z02IidY{0@wgdi~J)Lnqqmoa2ABm-$ThD0D;0(N>O&}+#I#Xvi53b;OF0=nLQ@`CUL J6s*7@1pq7ypMn4Y delta 203 zcmZqJ!Pu~YaYFzT%fJ8s|4$BKvVbrqFv)BT31OVXlEcUFq)O}HqpOU}3=9kos++4= z+L#5BY8p;EF&cR7{usE*NwVtEj5<&S6<52ENIT qKKh%#c%I>$q$4qTk*dgKyC9KCAu=pL2mha}5Mr`1WDVn@FeU)uaYq*b From dd52a4e613d6ec3a2fd890d86045c247ca188bef Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Thu, 20 Aug 2020 10:41:10 -0600 Subject: [PATCH 13/18] Fix file name spelling --- ...luginTemplateFactory.cs => EssentialsPluginTemplateFactory.cs} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename PDT.EssentialsPluginTemplate.EPI/{EssentailsPluginTemplateFactory.cs => EssentialsPluginTemplateFactory.cs} (100%) diff --git a/PDT.EssentialsPluginTemplate.EPI/EssentailsPluginTemplateFactory.cs b/PDT.EssentialsPluginTemplate.EPI/EssentialsPluginTemplateFactory.cs similarity index 100% rename from PDT.EssentialsPluginTemplate.EPI/EssentailsPluginTemplateFactory.cs rename to PDT.EssentialsPluginTemplate.EPI/EssentialsPluginTemplateFactory.cs From c67e67b94226ab7ea0b3774c74533d1f1b6b83ca Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Thu, 20 Aug 2020 10:49:04 -0600 Subject: [PATCH 14/18] fixing some files in the project file --- .../PDT.EssentialsPluginTemplate.EPI.csproj | 4 ++-- .../PDT.EssentialsPluginTemplate.EPI.suo | Bin 23552 -> 0 bytes 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 PDT.EssentialsPluginTemplate.EPI/PDT.EssentialsPluginTemplate.EPI.suo diff --git a/PDT.EssentialsPluginTemplate.EPI/PDT.EssentialsPluginTemplate.EPI.csproj b/PDT.EssentialsPluginTemplate.EPI/PDT.EssentialsPluginTemplate.EPI.csproj index 5a9ae47..e3bae95 100644 --- a/PDT.EssentialsPluginTemplate.EPI/PDT.EssentialsPluginTemplate.EPI.csproj +++ b/PDT.EssentialsPluginTemplate.EPI/PDT.EssentialsPluginTemplate.EPI.csproj @@ -91,9 +91,9 @@ - - + + diff --git a/PDT.EssentialsPluginTemplate.EPI/PDT.EssentialsPluginTemplate.EPI.suo b/PDT.EssentialsPluginTemplate.EPI/PDT.EssentialsPluginTemplate.EPI.suo deleted file mode 100644 index a6dd2adce2666f03d2a07f2d93e749e0acc25d16..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23552 zcmeI4dvIJ;9mnssP>LuN3KeK6p+>CGu1T9mTV74FNgt$bAfZ%^E!(_E8=9C$lR^>j zi3;KiVH|OM05hWF4F5Pj{(}FUQHy`zX#Yb0V01<)jN|Bx()jtFb5HhW_wL=h$u`}E zo}KUByZ4@R&pE&Id!64ocV9Vi>1*GA@#;T&S?N}9v3Gjs_k%0JRp4r{608E(fYsnyPzA07H-Ha;8^H&`^!ij#DsBDI_bymA`G>?}GHul$lRBtz*gNFyp!R;wTD>WI zBj)!CG?1%b$C$+o?<#Mt*WlH8%^Yj^-t4XCdjsb+oYnG4adu#)m7P#14fX#f!X5-c`oh|uR3d)tv z)fYX>U3WS_@-ICQ)B#TZmDkDX737H{|Mlcc0m;8)UHU{i#L2((f#hF$Nza#V&~ZJ- zq<>z+u@H`oI@z#ZUD&;@dy|OBjA%@6o^m8!2~!8CV?bL(tJO702~Jof=_{mz{6njk5hkp^JM$h z@9bNW+Ij6i)U~2gYfGodFz57Ui#TlVNwPGbr1CF-7PzF_yBoTWB8`L4c)+WILkIcY z=k-8a-5KP3jC>v3>4xvdjI>H`4l0Pq%fR=U>TJXLd=IYo$$t{Dr6yVvy8e|W^9Y7Y8$G0&5) zpp;#Iv!QpIF&Kg3qT)DI&7any|E}V;bQ59}OaF^zKl2}%UBB#44}Bjo^c|-DsM_VL zSo?E95%nwY(meIInLhWTPlg$lQPUPbYv_Uc6Y95~7q|b)+a@CrNTP}Kf|Ubnl?SLl z4F^|wYSob8h$^)56q>aG&D@PP9HfP^;A5a4npL6wWXUFsJXFz-an5_WHq5=v@O};D z_EJx`DLKw@%=A;d{n!GxK)gOg5Bq6LrXB8gxwOZ&^6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8wl1lf>mXYXJ6pPa*( zDT?~V?S3pScOlu*R)_zT$i_!`BT@HC?;FP7Lty_=D|t>kql3eDC5Kr@Y2&5uN}6Tf zqt;tv+M{4+cpFMajfHUlpp7wt`yLIkZeiSJ5e@i;i- zTwSmL8NLAO93kQqD3GVv`U^a+=-ZWCf6(`DGy6;IKOG*Mv7&!k*7~} Date: Thu, 20 Aug 2020 10:50:17 -0600 Subject: [PATCH 15/18] fix build workflow --- .github/workflows/docker.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 08c269d..12e5a06 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -6,7 +6,7 @@ on: - feature/* - hotfix/* - release/* - - master + - main - development env: @@ -59,6 +59,11 @@ jobs: run: | Write-Output ${{ env.VERSION }} ./.github/scripts/UpdateAssemblyVersion.ps1 ${{ env.VERSION }} + - name: Login to Docker + uses: azure/docker-login@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_TOKEN }} # Build the solutions in the docker image - name: Build Solution shell: powershell From 6b9316259272f9eb1955c8a77396fcbd99eb8dd5 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Thu, 20 Aug 2020 10:52:34 -0600 Subject: [PATCH 16/18] fix docker hub secrets --- .github/workflows/docker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 12e5a06..7a953a4 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -62,8 +62,8 @@ jobs: - name: Login to Docker uses: azure/docker-login@v1 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_TOKEN }} + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} # Build the solutions in the docker image - name: Build Solution shell: powershell From 4b4148af02c1470ce1f5cb135dae476ab9608a8c Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Thu, 20 Aug 2020 10:54:08 -0600 Subject: [PATCH 17/18] fix scripts to change master -> main --- .github/scripts/GenerateVersionNumber.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/GenerateVersionNumber.ps1 b/.github/scripts/GenerateVersionNumber.ps1 index d05aecd..052d48a 100644 --- a/.github/scripts/GenerateVersionNumber.ps1 +++ b/.github/scripts/GenerateVersionNumber.ps1 @@ -1,4 +1,4 @@ -$latestVersions = $(git tag --merged origin/master) +$latestVersions = $(git tag --merged origin/main) $latestVersion = [version]"0.0.0" Foreach ($version in $latestVersions) { Write-Host $version @@ -17,7 +17,7 @@ $newVersion = [version]$latestVersion $phase = "" $newVersionString = "" switch -regex ($Env:GITHUB_REF) { - '^refs\/heads\/master*.' { + '^refs\/heads\/main*.' { $newVersionString = "{0}.{1}.{2}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1) } '^refs\/heads\/feature\/*.' { From 10c23fcd409a7481ed3cc93a1615dffd8b15cfde Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Thu, 20 Aug 2020 10:56:03 -0600 Subject: [PATCH 18/18] fix workflow to change master -> main --- .github/workflows/docker.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 7a953a4..bfff1c9 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -18,8 +18,8 @@ env: VERSION: 0.0.0-buildtype-buildnumber # Defaults to debug for build type BUILD_TYPE: Debug - # Defaults to master as the release branch. Change as necessary - RELEASE_BRANCH: master + # Defaults to main as the release branch. Change as necessary + RELEASE_BRANCH: main jobs: Build_Project: runs-on: windows-latest @@ -38,7 +38,7 @@ jobs: git submodule sync --recursive git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 # Set the BUILD_TYPE environment variable - - name: Set Build to Release if triggered from Master + - name: Set Build to Release if triggered from main run: | if("$($Env:GITHUB_REF)".contains("$($Env:RELEASE_BRANCH)")) { Write-Host "Setting build type to Release"