Skip to content

Commit

Permalink
Pin yarn@1.22.19
Browse files Browse the repository at this point in the history
Workaround for yarnpkg/yarn#9011
  • Loading branch information
Cyberboss committed Nov 14, 2023
1 parent 2fba0f4 commit 23f2a30
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
3 changes: 0 additions & 3 deletions build/Dockerfile
Expand Up @@ -19,9 +19,6 @@ RUN . $NVM_DIR/nvm.sh \
&& rm -rf /var/lib/apt/lists/* \
&& npm install -g npm

#You may wonder why this needs to be in a seperate step. I don't know... It just works(tm)
RUN npm install -g yarn

# Build web control panel
WORKDIR /repo/build

Expand Down
1 change: 1 addition & 0 deletions build/Version.props
Expand Up @@ -19,5 +19,6 @@
<!-- Update this frequently with dotnet runtime patches. MAJOR MUST MATCH ABOVE! -->
<TgsDotnetRedistUrl>https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/6.0.24/dotnet-hosting-6.0.24-win.exe</TgsDotnetRedistUrl>
<TgsMariaDBRedistVersion>10.11.6</TgsMariaDBRedistVersion>
<TgsYarnVersion>1.22.19</TgsYarnVersion>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/Tgstation.Server.Common/Tgstation.Server.Common.csproj
Expand Up @@ -17,7 +17,7 @@
<!-- This is here because I know we have node as a build dep so this just works -->
<Target Name="IconGeneration" BeforeTargets="ResolveAssemblyReferences" Inputs="build_logo.js;../../build/logo.svg" Outputs="../../artifacts/tgs.ico;../../artifacts/tgs.png">
<Message Text="Restoring yarn packages..." Importance="high" />
<Exec Command="npx --yes yarn add svg-to-ico@1.0.14 svg2img@1.0.0-beta.2" />
<Exec Command="npx --yes yarn@$(TgsYarnVersion) add svg-to-ico@1.0.14 svg2img@1.0.0-beta.2" />
<Message Text="Generating icons from SVG..." Importance="high" />
<Exec Command="node ./build_logo.js" />
</Target>
Expand Down
4 changes: 2 additions & 2 deletions src/Tgstation.Server.Host/Tgstation.Server.Host.csproj
Expand Up @@ -28,13 +28,13 @@
<Exec Command="git clone https://github.com/tgstation/tgstation-server-webpanel --branch v$(TgsControlPanelVersion) --depth 1 ClientApp" />
<RemoveDir Directories="ClientApp/.git" /> <!-- Allows git clean to clean it out -->
<Message Text="Restoring yarn packages..." Importance="high" />
<Exec WorkingDirectory="ClientApp" Command="npx --yes yarn install --immutable" />
<Exec WorkingDirectory="ClientApp" Command="npx --yes yarn@$(TgsYarnVersion) install --immutable" />
<Touch Files="$(NpmInstallStampFile)" AlwaysCreate="true" />
</Target>

<Target Condition="'$(TGS_HOST_NO_WEBPANEL)' != 'true'" Name="NpmBuild" BeforeTargets="BeforeBuild" DependsOnTargets="ClientInstall" Inputs="../../build/ControlPanelVersion.props" Outputs="wwwroot\index.html">
<Message Text="Building web control panel..." Importance="high" />
<Exec WorkingDirectory="ClientApp" Command="npx --yes yarn run msbuild" />
<Exec WorkingDirectory="ClientApp" Command="npx --yes yarn@$(TgsYarnVersion) run msbuild" />
</Target>

<Target Name="NpmClean" AfterTargets="Clean">
Expand Down

0 comments on commit 23f2a30

Please sign in to comment.