From 90852ec96b47036ed22b17bdc87274e7fb25dc15 Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Thu, 28 Jan 2021 08:47:45 +0100 Subject: [PATCH 1/8] Set build to 2.3.0 beta --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index b94bf3a..52f9836 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,7 @@ image: Visual Studio 2017 # Version format -version: 2.2.0.{build} +version: 2.3.0.{build} branches: only: @@ -9,7 +9,7 @@ branches: - master init: - - set UMBRACO_PACKAGE_PRERELEASE_SUFFIX=rtm + - set UMBRACO_PACKAGE_PRERELEASE_SUFFIX=beta assembly_info: patch: true From b5dce0b7a79bd0b26d212854c9fb2cfa28cffff4 Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Tue, 6 Apr 2021 16:31:22 +0200 Subject: [PATCH 2/8] Added code inspection --- .github/workflows/codeinspect.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/codeinspect.yml diff --git a/.github/workflows/codeinspect.yml b/.github/workflows/codeinspect.yml new file mode 100644 index 0000000..fc66f57 --- /dev/null +++ b/.github/workflows/codeinspect.yml @@ -0,0 +1,31 @@ +# This is a basic workflow to help you get started with Actions + +name: Code inspect + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the develop branch + push: + branches: [ develop ] + pull_request: + branches: [ develop ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + code-inspect: + # The type of runner that the job will run on + runs-on: windows-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - name: Resharper InspectCode + # You may pin to the exact commit or the version. + # uses: nbadal/inspectcode-action@f12f9dfbb9e8b53895ec1a50e306ccd73c7d9aa4 + uses: nbadal/inspectcode-action@v1 + with: + # Path to your solution file, ex: MyProject.sln + solution: src/Our.Umbraco.Nexu.sln From dfc25f5d94e1b7487c1de0b14fef6e1082ee5729 Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Tue, 6 Apr 2021 16:33:35 +0200 Subject: [PATCH 3/8] Update codeinspect.yml Fix spacing --- .github/workflows/codeinspect.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeinspect.yml b/.github/workflows/codeinspect.yml index fc66f57..9cedda6 100644 --- a/.github/workflows/codeinspect.yml +++ b/.github/workflows/codeinspect.yml @@ -18,7 +18,7 @@ jobs: # This workflow contains a single job called "build" code-inspect: # The type of runner that the job will run on - runs-on: windows-latest + runs-on: windows-latest # Steps represent a sequence of tasks that will be executed as part of the job steps: From 792b7f6e9924e664845a80122ad5dc5f0df901b1 Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Tue, 6 Apr 2021 16:35:22 +0200 Subject: [PATCH 4/8] Update codeinspect.yml Change to ubuntu --- .github/workflows/codeinspect.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeinspect.yml b/.github/workflows/codeinspect.yml index 9cedda6..aff1f05 100644 --- a/.github/workflows/codeinspect.yml +++ b/.github/workflows/codeinspect.yml @@ -18,7 +18,7 @@ jobs: # This workflow contains a single job called "build" code-inspect: # The type of runner that the job will run on - runs-on: windows-latest + runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job steps: From 4c32fe598419660a80fe5a96c2f7554f995bfc4b Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Tue, 6 Apr 2021 16:38:36 +0200 Subject: [PATCH 5/8] Update codeinspect.yml Fix path to solution --- .github/workflows/codeinspect.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codeinspect.yml b/.github/workflows/codeinspect.yml index aff1f05..8f96dd7 100644 --- a/.github/workflows/codeinspect.yml +++ b/.github/workflows/codeinspect.yml @@ -22,10 +22,12 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: + - name: Checkout + uses: actions/checkout@v2 - name: Resharper InspectCode # You may pin to the exact commit or the version. # uses: nbadal/inspectcode-action@f12f9dfbb9e8b53895ec1a50e306ccd73c7d9aa4 uses: nbadal/inspectcode-action@v1 with: # Path to your solution file, ex: MyProject.sln - solution: src/Our.Umbraco.Nexu.sln + solution: ./src/Our.Umbraco.Nexu.sln From ac02f37094a23667f153985685d5d937a896f72d Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Mon, 9 Aug 2021 11:37:39 +0200 Subject: [PATCH 6/8] Added media picker --- .../Core/MediaPicker3.cs | 50 +++++++++++++++++++ .../Our.Umbraco.Nexu.Parsers.csproj | 1 + 2 files changed, 51 insertions(+) create mode 100644 src/Our.Umbraco.Nexu.Parsers/Core/MediaPicker3.cs diff --git a/src/Our.Umbraco.Nexu.Parsers/Core/MediaPicker3.cs b/src/Our.Umbraco.Nexu.Parsers/Core/MediaPicker3.cs new file mode 100644 index 0000000..42af482 --- /dev/null +++ b/src/Our.Umbraco.Nexu.Parsers/Core/MediaPicker3.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Our.Umbraco.Nexu.Common.Interfaces.Models; +using Our.Umbraco.Nexu.Common.Models; +using Umbraco.Core; + +namespace Our.Umbraco.Nexu.Parsers.Core +{ + public class MediaPicker3 : IPropertyValueParser + { + public bool IsParserFor(string propertyEditorAlias) => + propertyEditorAlias.Equals("Umbraco.MediaPicker3"); + + public IEnumerable GetRelatedEntities(string value) + { + var entities = new List(); + + if (!string.IsNullOrWhiteSpace(value)) + { + try + { + var jsonValues = JsonConvert.DeserializeObject(value); + + foreach (var item in jsonValues) + { + if (item["mediaKey"] != null) + { + var mediaKey = item.Value("mediaKey"); + + var udi = Udi.Create("media", Guid.Parse(mediaKey)); + + entities.Add(new RelatedMediaEntity + { + RelatedEntityUdi = udi, + }); + } + } + } + catch + { + // swallow it + } + } + + return entities; + } + } +} diff --git a/src/Our.Umbraco.Nexu.Parsers/Our.Umbraco.Nexu.Parsers.csproj b/src/Our.Umbraco.Nexu.Parsers/Our.Umbraco.Nexu.Parsers.csproj index 868b0e6..4e904c6 100644 --- a/src/Our.Umbraco.Nexu.Parsers/Our.Umbraco.Nexu.Parsers.csproj +++ b/src/Our.Umbraco.Nexu.Parsers/Our.Umbraco.Nexu.Parsers.csproj @@ -150,6 +150,7 @@ + From 1b82039196bc8128137d225b95f9d58f337cc708 Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Mon, 9 Aug 2021 11:38:31 +0200 Subject: [PATCH 7/8] Removed code inspect github action --- .github/workflows/codeinspect.yml | 33 ------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 .github/workflows/codeinspect.yml diff --git a/.github/workflows/codeinspect.yml b/.github/workflows/codeinspect.yml deleted file mode 100644 index 8f96dd7..0000000 --- a/.github/workflows/codeinspect.yml +++ /dev/null @@ -1,33 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: Code inspect - -# Controls when the action will run. -on: - # Triggers the workflow on push or pull request events but only for the develop branch - push: - branches: [ develop ] - pull_request: - branches: [ develop ] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - code-inspect: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Resharper InspectCode - # You may pin to the exact commit or the version. - # uses: nbadal/inspectcode-action@f12f9dfbb9e8b53895ec1a50e306ccd73c7d9aa4 - uses: nbadal/inspectcode-action@v1 - with: - # Path to your solution file, ex: MyProject.sln - solution: ./src/Our.Umbraco.Nexu.sln From 6405ef612d988bd860fc32e1399150c242eb8f45 Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Mon, 9 Aug 2021 11:42:39 +0200 Subject: [PATCH 8/8] Set build to release --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 52f9836..6e43d9c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,7 +9,7 @@ branches: - master init: - - set UMBRACO_PACKAGE_PRERELEASE_SUFFIX=beta + - set UMBRACO_PACKAGE_PRERELEASE_SUFFIX=rtm assembly_info: patch: true