Skip to content

Commit

Permalink
Merge branch 'hotfix/2.0.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
KarmaKamikaze committed Sep 25, 2024
2 parents 1f37e5e + e068187 commit cdbf107
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion MoxfieldPriceScraper/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ COPY *.csproj ./
RUN DOTNET_EnableWriteXorExecute=0 dotnet restore

COPY . ./
RUN DOTNET_EnableWriteXorExecute=0 dotnet publish -c $BUILD_CONFIGURATION -o out --no-restore
RUN DOTNET_EnableWriteXorExecute=0 dotnet publish -c $BUILD_CONFIGURATION -o out --no-restore -p:DOCKER_BUILD=true

FROM mcr.microsoft.com/dotnet/runtime:8.0 AS runtime
WORKDIR /app
Expand Down
4 changes: 4 additions & 0 deletions MoxfieldPriceScraper/MoxfieldPriceScraper.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup Condition="'$(DOCKER_BUILD)' == 'true'">
<DefineConstants>DOCKER</DefineConstants>
</PropertyGroup>

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
Expand Down
10 changes: 4 additions & 6 deletions MoxfieldPriceScraper/MoxfieldScraper.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Drawing;
using System.Globalization;
using System.Runtime.InteropServices;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using Serilog;
Expand Down Expand Up @@ -121,12 +120,11 @@ private void InitializeWebDriver()
};
chromeOptions.AddUserProfilePreference("prefs", preferences);

#if DOCKER
// Skip driver setup for ARM architecture
if (!(RuntimeInformation.OSArchitecture == Architecture.Arm &&
RuntimeInformation.OSArchitecture == Architecture.Arm64))
{
new DriverManager().SetUpDriver(new ChromeConfig());
}
#else
new DriverManager().SetUpDriver(new ChromeConfig());
#endif

_driver = new ChromeDriver(chromeOptions);
_driver.Manage().Timeouts().ImplicitWait = _elementSeekTimeout;
Expand Down

0 comments on commit cdbf107

Please sign in to comment.