From fed9f1cfb7f9dbaf89491ca8e40eb241374cf0be Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Fri, 9 Apr 2021 20:39:32 +0200 Subject: Remove links to github repo --- LICENSE_NOTICES | 4 ++-- README.md | 8 ++++---- src/IOL.VippsEcommerce/IOL.VippsEcommerce.csproj | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/LICENSE_NOTICES b/LICENSE_NOTICES index c37df05..fdbdf58 100644 --- a/LICENSE_NOTICES +++ b/LICENSE_NOTICES @@ -4,12 +4,12 @@ be distributed under licenses different than the IOL.VippsEcommerce software. In the event that we accidentally failed to list a required notice, please bring it to our attention through any of the ways detailed here: - https://github.com/ivarlovlie/IOL.VippsEcommerce/issues + ivar@ivarlovlie.no The attached notices are provided for information only. For any licenses that require disclosure of source, sources are available at -https://github.com/ivarlovlie/IOL.VippsEcommerce/. +https://git.sr.ht/~ivar/IOL.VippsEcommerce/. License Notice for Microsoft.NET.Sdk --------------------------- diff --git a/README.md b/README.md index 8bf178b..29e4305 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Implements https://vippsas.github.io/vipps-ecom-api/, more or less (see [IVippsEcommerceService.cs](https://github.com/ivarlovlie/IOL.VippsEcommerce/blob/master/src/IOL.VippsEcommerce/IVippsEcommerceService.cs)). +Implements https://vippsas.github.io/vipps-ecom-api/, more or less (see [IVippsEcommerceService.cs](https://git.sr.ht/~ivar/IOL.VippsEcommerce/tree/master/item/src/IOL.VippsEcommerce/VippsEcommerceService.cs)). `dotnet add package IOL.VippsEcommerce` @@ -18,15 +18,15 @@ services.AddVippsEcommerceService(o => { }); ``` -See [VippsConfiguration.cs](https://github.com/ivarlovlie/IOL.VippsEcommerce/blob/master/src/IOL.VippsEcommerce/Models/VippsConfiguration.cs) for available properties. -You can configure how to get values with the `ConfigurationMode` property, valid modes is specified in [VippsConfigurationMode.cs](https://github.com/ivarlovlie/IOL.VippsEcommerce/blob/master/src/IOL.VippsEcommerce/Models/VippsConfigurationMode.cs), example: +See [VippsConfiguration.cs](https://git.sr.ht/~ivar/IOL.VippsEcommerce/tree/master/item/src/IOL.VippsEcommerce/Models/VippsConfiguration.cs) for available properties. +You can configure how to get values with the `ConfigurationMode` property, valid modes is specified in [VippsConfigurationMode.cs](https://git.sr.ht/~ivar/IOL.VippsEcommerce/tree/master/item/src/IOL.VippsEcommerce/Models/VippsConfigurationMode.cs), example: ```csharp services.AddVippsEcommerceService(o => { o.ConfigurationMode = VippsConfigurationMode.ENVIRONMENT_THEN_OBJECT; }); ``` -With the above example, the service will look for configuration values in the current environment using names specified in [VippsConfigurationKeyNames.cs](https://github.com/ivarlovlie/IOL.VippsEcommerce/blob/master/src/IOL.VippsEcommerce/Models/VippsConfigurationKeyNames.cs), then in the configuration object. The environment variable name for a given property is also specified in it's XML-documentation. +With the above example, the service will look for configuration values in the current environment using names specified in [VippsConfigurationKeyNames.cs](https://git.sr.ht/~ivar/IOL.VippsEcommerce/tree/master/item/src/IOL.VippsEcommerce/Models/VippsConfigurationKeyNames.cs), then in the configuration object. The environment variable name for a given property is also specified in it's XML-documentation. > [Environment.GetEnvironmentVariable](https://docs.microsoft.com/en-us/dotnet/api/system.environment.getenvironmentvariable?view=net-5.0) is used to retrieve environment variables, that means that user-secrets and anything else than process-spesific variables (`VARIABLE=value dotnet YourBinary.dll`) does not register on Unix systems. diff --git a/src/IOL.VippsEcommerce/IOL.VippsEcommerce.csproj b/src/IOL.VippsEcommerce/IOL.VippsEcommerce.csproj index 9bc526b..0643154 100644 --- a/src/IOL.VippsEcommerce/IOL.VippsEcommerce.csproj +++ b/src/IOL.VippsEcommerce/IOL.VippsEcommerce.csproj @@ -5,9 +5,9 @@ Ivar Løvlie Dotnet classlib for communicating with the vipps e-commerce api. Dotnet classlib for communicating with the vipps e-commerce api. - https://github.com/ivarlovlie/IOL.VippsEcommerce - https://github.com/ivarlovlie/IOL.VippsEcommerce/blob/master/LICENSE - https://github.com/ivarlovlie/IOL.VippsEcommerce + https://git.sr.ht/~ivar/IOL.VippsEcommerce + https://git.sr.ht/~ivar/IOL.VippsEcommerce/tree/master/item/LICENSE + https://git.sr.ht/~ivar/IOL.VippsEcommerce git dotnet;vipps-api net5.0 -- cgit v1.3 From f495236551a8b5eab81778069936305a38859566 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Fri, 9 Apr 2021 20:49:58 +0200 Subject: Remove github actions --- .github/workflows/run-tests.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .github/workflows/run-tests.yml diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml deleted file mode 100644 index d63f071..0000000 --- a/.github/workflows/run-tests.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: .NET - -on: - release: - types: [created] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 5.0.x - - name: Restore dependencies - run: dotnet restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj - - name: Build - run: dotnet build --no-restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj - - name: Test - run: dotnet test --no-build --verbosity normal src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj -- cgit v1.3 From 20b961f9fac029d9239cf9cd1059c65b528be18d Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Fri, 9 Apr 2021 20:51:16 +0200 Subject: Add builds.sr.ht yml --- .builds/.run-tests.yml | 12 ++++++++++++ .gitignore | 1 - 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .builds/.run-tests.yml diff --git a/.builds/.run-tests.yml b/.builds/.run-tests.yml new file mode 100644 index 0000000..e2885f3 --- /dev/null +++ b/.builds/.run-tests.yml @@ -0,0 +1,12 @@ +image: alpine/latest +packages: + - dotnet +sources: + - https://git.sr.ht/~ivar/IOL.VippsEcommerce +tasks: + - restore: | + dotnet restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj + - build: | + dotnet build --no-restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj + - test: | + dotnet test --no-build --verbosity normal src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj diff --git a/.gitignore b/.gitignore index 340e2ec..dd3eec9 100644 --- a/.gitignore +++ b/.gitignore @@ -91,7 +91,6 @@ StyleCopReport.xml *.log *.vspscc *.vssscc -.builds *.pidb *.svclog *.scc -- cgit v1.3 From 798040fcb14a4845ae2f0c513824f9647ac35ada Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Fri, 9 Apr 2021 21:07:14 +0200 Subject: Install dotnet with dotnet-install.sh --- .builds/.run-tests.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.builds/.run-tests.yml b/.builds/.run-tests.yml index e2885f3..c6888f7 100644 --- a/.builds/.run-tests.yml +++ b/.builds/.run-tests.yml @@ -1,9 +1,19 @@ image: alpine/latest packages: - - dotnet + - bash + - icu-libs + - krb5-libs + - libgcc + - libintl + - libssl1.1 + - libssl1.1 + - zlib sources: - https://git.sr.ht/~ivar/IOL.VippsEcommerce tasks: + - install-dotnet: | + wget https://dot.net/v1/dotnet-install.sh + ./dotnet-install.sh -c 5.0 - restore: | dotnet restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj - build: | -- cgit v1.3 From 884902e6dda7aaa133978a4b6225d449f2a7f9f3 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Fri, 9 Apr 2021 21:12:16 +0200 Subject: Set execution permission on dotnet-install.sh --- .builds/.run-tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.builds/.run-tests.yml b/.builds/.run-tests.yml index c6888f7..845fe8f 100644 --- a/.builds/.run-tests.yml +++ b/.builds/.run-tests.yml @@ -13,7 +13,8 @@ sources: tasks: - install-dotnet: | wget https://dot.net/v1/dotnet-install.sh - ./dotnet-install.sh -c 5.0 + chmod +x dotnet-install.sh + bash dotnet-install.sh -c 5.0 - restore: | dotnet restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj - build: | -- cgit v1.3 From 521e7aa2a1f41a9b58184de8ae6139fd3a9da119 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Fri, 9 Apr 2021 21:15:22 +0200 Subject: Add dotnet to path after install --- .builds/.run-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.builds/.run-tests.yml b/.builds/.run-tests.yml index 845fe8f..3cbafbc 100644 --- a/.builds/.run-tests.yml +++ b/.builds/.run-tests.yml @@ -15,6 +15,7 @@ tasks: wget https://dot.net/v1/dotnet-install.sh chmod +x dotnet-install.sh bash dotnet-install.sh -c 5.0 + PATH="$PATH:$HOME/.dotnet" - restore: | dotnet restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj - build: | -- cgit v1.3 From 683940cb37ae68780f7cc1fe9885d2e7ca9e8069 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Fri, 9 Apr 2021 21:17:27 +0200 Subject: Export PATH after adding dotnet --- .builds/.run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.builds/.run-tests.yml b/.builds/.run-tests.yml index 3cbafbc..2ff93d3 100644 --- a/.builds/.run-tests.yml +++ b/.builds/.run-tests.yml @@ -15,7 +15,7 @@ tasks: wget https://dot.net/v1/dotnet-install.sh chmod +x dotnet-install.sh bash dotnet-install.sh -c 5.0 - PATH="$PATH:$HOME/.dotnet" + export PATH="$PATH:$HOME/.dotnet" - restore: | dotnet restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj - build: | -- cgit v1.3 From 4b1e753f20fe1bcf4f7c8499155ceb56a227f80a Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Fri, 9 Apr 2021 21:22:03 +0200 Subject: Use full path to dotnet --- .builds/.run-tests.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.builds/.run-tests.yml b/.builds/.run-tests.yml index 2ff93d3..b1f5ab2 100644 --- a/.builds/.run-tests.yml +++ b/.builds/.run-tests.yml @@ -15,10 +15,11 @@ tasks: wget https://dot.net/v1/dotnet-install.sh chmod +x dotnet-install.sh bash dotnet-install.sh -c 5.0 - export PATH="$PATH:$HOME/.dotnet" + - display-dotnet-info: | + ./.dotnet/dotnet --info - restore: | - dotnet restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj + ./.dotnet/dotnet restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj - build: | - dotnet build --no-restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj + ./.dotnet/dotnet build --no-restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj - test: | - dotnet test --no-build --verbosity normal src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj + ./.dotnet/dotnet test --no-build --verbosity normal src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj -- cgit v1.3 From 140be24e113908643e0f75ba2d22100b8611757b Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Fri, 9 Apr 2021 21:31:28 +0200 Subject: Set PATH in yml --- .builds/.run-tests.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.builds/.run-tests.yml b/.builds/.run-tests.yml index b1f5ab2..a433dc2 100644 --- a/.builds/.run-tests.yml +++ b/.builds/.run-tests.yml @@ -10,16 +10,20 @@ packages: - zlib sources: - https://git.sr.ht/~ivar/IOL.VippsEcommerce +environment: + PATH: $PATH:$HOME/.dotnet tasks: - install-dotnet: | wget https://dot.net/v1/dotnet-install.sh chmod +x dotnet-install.sh bash dotnet-install.sh -c 5.0 - display-dotnet-info: | - ./.dotnet/dotnet --info + dotnet --info + - navigate-to-repo: | + cd $HOME/IOL.VippsEcommerce - restore: | - ./.dotnet/dotnet restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj + dotnet restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj - build: | - ./.dotnet/dotnet build --no-restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj + dotnet build --no-restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj - test: | - ./.dotnet/dotnet test --no-build --verbosity normal src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj + dotnet test --no-build --verbosity normal src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj -- cgit v1.3 From 1f27907ac4b611b17c8a23fa7c15d3731a2e5a7b Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Fri, 9 Apr 2021 21:36:13 +0200 Subject: Use full path for dotnet --- .builds/.run-tests.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.builds/.run-tests.yml b/.builds/.run-tests.yml index a433dc2..cf4c368 100644 --- a/.builds/.run-tests.yml +++ b/.builds/.run-tests.yml @@ -10,20 +10,18 @@ packages: - zlib sources: - https://git.sr.ht/~ivar/IOL.VippsEcommerce -environment: - PATH: $PATH:$HOME/.dotnet tasks: - install-dotnet: | wget https://dot.net/v1/dotnet-install.sh chmod +x dotnet-install.sh bash dotnet-install.sh -c 5.0 - display-dotnet-info: | - dotnet --info + ./$HOME/.dotnet/dotnet --info - navigate-to-repo: | cd $HOME/IOL.VippsEcommerce - restore: | - dotnet restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj + ./$HOME/.dotnet/dotnet restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj - build: | - dotnet build --no-restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj + ./$HOME/.dotnet/dotnet build --no-restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj - test: | - dotnet test --no-build --verbosity normal src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj + ./$HOME/.dotnet/dotnet test --no-build --verbosity normal src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj -- cgit v1.3 From bff6003cf6b4ae88963a099fcff377035e117b6e Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Fri, 9 Apr 2021 21:44:03 +0200 Subject: Use full path for dotnet --- .builds/.run-tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.builds/.run-tests.yml b/.builds/.run-tests.yml index cf4c368..a48f5bb 100644 --- a/.builds/.run-tests.yml +++ b/.builds/.run-tests.yml @@ -16,12 +16,12 @@ tasks: chmod +x dotnet-install.sh bash dotnet-install.sh -c 5.0 - display-dotnet-info: | - ./$HOME/.dotnet/dotnet --info + $HOME/.dotnet/dotnet --info - navigate-to-repo: | cd $HOME/IOL.VippsEcommerce - restore: | - ./$HOME/.dotnet/dotnet restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj + $HOME/.dotnet/dotnet restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj - build: | - ./$HOME/.dotnet/dotnet build --no-restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj + $HOME/.dotnet/dotnet build --no-restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj - test: | - ./$HOME/.dotnet/dotnet test --no-build --verbosity normal src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj + $HOME/.dotnet/dotnet test --no-build --verbosity normal src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj -- cgit v1.3 From 7e0373f87ef4412708560489e06f734a36923a1b Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Fri, 9 Apr 2021 21:50:01 +0200 Subject: Change dir into repo on every relevant task --- .builds/.run-tests.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.builds/.run-tests.yml b/.builds/.run-tests.yml index a48f5bb..c043173 100644 --- a/.builds/.run-tests.yml +++ b/.builds/.run-tests.yml @@ -17,11 +17,12 @@ tasks: bash dotnet-install.sh -c 5.0 - display-dotnet-info: | $HOME/.dotnet/dotnet --info - - navigate-to-repo: | - cd $HOME/IOL.VippsEcommerce - restore: | + cd $HOME/IOL.VippsEcommerce $HOME/.dotnet/dotnet restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj - build: | + cd $HOME/IOL.VippsEcommerce $HOME/.dotnet/dotnet build --no-restore src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj - test: | + cd $HOME/IOL.VippsEcommerce $HOME/.dotnet/dotnet test --no-build --verbosity normal src/IOL.VippsEcommerce.Tests/IOL.VippsEcommerce.Tests.csproj -- cgit v1.3