Skip to content

Commit

Permalink
fix: Hx_DocFX_Git used a git tocken for cloning of a documentation re…
Browse files Browse the repository at this point in the history
…pository, which was then written in the obj cache DocFX files.
  • Loading branch information
hennadiilu committed Jan 29, 2024
1 parent 6d5f532 commit f14ed75
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 33 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/net-nuget.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .github/workflows/net-pr.yml

This file was deleted.

8 changes: 8 additions & 0 deletions .github/workflows/pr-net.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: "PR: .NET"

on:
pull_request:

jobs:
Checks:
uses: Heleonix/workflows/.github/workflows/pr-net.yml@main
18 changes: 18 additions & 0 deletions .github/workflows/release-net-nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Release: .NET / NuGet"

permissions:
contents: write

on:
push:
branches:
- master
paths:
- 'src/**'
- 'LICENSE'
- 'README.md'

jobs:
Release:
uses: Heleonix/workflows/.github/workflows/release-net-nuget.yml@main
secrets: inherit
1 change: 0 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<NeutralLanguage>en-US</NeutralLanguage>
<SatelliteResourceLanguages>en-US</SatelliteResourceLanguages>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Heleonix.Build.sln
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{3499
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{34F2A7E3-FDE8-4425-BD9C-323F304F8EEE}"
ProjectSection(SolutionItems) = preProject
.github\workflows\net-nuget.yml = .github\workflows\net-nuget.yml
.github\workflows\net-pr.yml = .github\workflows\net-pr.yml
.github\workflows\pr-net.yml = .github\workflows\pr-net.yml
.github\workflows\release-net-nuget.yml = .github\workflows\release-net-nuget.yml
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Heleonix.Build.Tests.ExeMock", "test\Heleonix.Build.Tests.ExeMock\Heleonix.Build.Tests.ExeMock.csproj", "{3D5694BD-41EC-4E7B-8775-2757EA4059CA}"
Expand Down
1 change: 1 addition & 0 deletions src/Heleonix.Build/Heleonix.Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<TargetFramework>net6.0</TargetFramework>
<PackAsTool>true</PackAsTool>
<ToolCommandName>hxbuild</ToolCommandName>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

<ItemGroup>
Expand Down
9 changes: 2 additions & 7 deletions src/Heleonix.Build/Targets/Hx_DocFX_Git.targets
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@

<Message Text="> 2/4: Downloading a documentation project from '$(Hx_DocFX_RepositoryUrl)' and branch '$(Hx_DocFX_Git_BranchName)' into the $(Hx_DocFX_ArtifactsDir)" Importance="high"/>
<Exec
Condition="'$(Hx_DocFX_Git_Token)' != '' and $(Hx_DocFX_RepositoryUrl.StartsWith('https://'))"
Command="&quot;$(_Hx_DocFX_Git_GitExe)&quot; clone &quot;$(Hx_DocFX_RepositoryUrl.Replace('https://','https://$(Hx_DocFX_Git_Token)@'))&quot; --branch $(Hx_DocFX_Git_BranchName) --single-branch ."
WorkingDirectory="$(Hx_DocFX_ArtifactsDir)"
EchoOff="true"/>
<Exec
Condition="'$(Hx_DocFX_Git_Token)' == '' or !$(Hx_DocFX_RepositoryUrl.StartsWith('https://'))"
Command="&quot;$(_Hx_DocFX_Git_GitExe)&quot; clone &quot;$(Hx_DocFX_RepositoryUrl)&quot; --branch $(Hx_DocFX_Git_BranchName) --single-branch ."
WorkingDirectory="$(Hx_DocFX_ArtifactsDir)"/>

Expand Down Expand Up @@ -71,7 +65,8 @@
<Exec
Condition="'$(_Hx_DocFX_Git_ChangesCount)' != '0' and ('$(Hx_DocFX_Git_Token)' == '' or !$(Hx_DocFX_RepositoryUrl.StartsWith('https://')))"
Command="&quot;$(_Hx_DocFX_Git_GitExe)&quot; push &quot;$(Hx_DocFX_RepositoryUrl&quot;"
WorkingDirectory="$(Hx_DocFX_ArtifactsDir)"/>
WorkingDirectory="$(Hx_DocFX_ArtifactsDir)"
EchoOff="true"/>
<Message
Condition="'$(_Hx_DocFX_Git_ChangesCount)' == '0'"
Text="The documentation is up to date. Nothing to upload."
Expand Down

0 comments on commit f14ed75

Please sign in to comment.