Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/generateclasses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
DOTNET_CreateDumpDiagnostics: 1
DOTNET_CreateDumpVerboseDiagnostics: 1
DOTNET_EnableCrashReport: 1
JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ENCODED_2_6_6 }}
JNet_Version: 2.6.6
JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ENCODED_2_6_9 }}
JNet_Version: 2.6.9
PDFBox_Version: 3.0.7
FONTCACHE_FOLDER: ${{ github.workspace }}\fontcache

Expand Down Expand Up @@ -86,10 +86,10 @@ jobs:
run: mvn "-DmavenSkipMain=true" --file ./src/jvm/netpdf/pom.xml --no-transfer-progress package

- name: Clear C# generated files
run: Remove-Item .\src\net\NetPDF\Generated\* -Recurse -Force -Exclude README.md
run: Remove-Item .\src\net\NetPDF\Generated\* -Recurse -Force -Exclude README.md,.editorconfig

- name: Clear Java generated files
run: Remove-Item .\src\jvm\netpdf\src\main\java\org\mases\netpdf\generated\* -Recurse -Force -Exclude README.md,.editorconfig
run: Remove-Item .\src\jvm\netpdf\src\main\java\org\mases\netpdf\generated\* -Recurse -Force -Exclude README.md

- name: Get last workflow run of JNet
if: ${{ inputs.UseLastRepositoryBuild == true }}
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:

- name: Use latest unpublished NuGet of JNetReflector
if: ${{ inputs.UseLastRepositoryBuild == true && inputs.UseLatestJNetReflectorSource == false }}
run: dotnet tool update -g MASES.JNetReflector
run: dotnet tool update --prerelease -g MASES.JNetReflector

- name: Download latest published version of JNetReflector
if: ${{ inputs.UseLastRepositoryBuild == false && inputs.UseLatestJNetReflectorSource == false }}
Expand Down
70 changes: 52 additions & 18 deletions .github/workflows/update_version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,57 +12,91 @@ on:
required: true
type: string
PreReleaseCurrentVersion:
description: 'The current version pre-release tag'
description: 'The current version pre-release tag (without dash, e.g. rc)'
required: false
type: string
NewVersion:
description: 'The new version'
required: true
type: string
PreReleaseNewVersion:
description: 'The new version pre-release tag'
description: 'The new version pre-release tag (without dash, e.g. rc)'
required: false
type: string
# This workflow contains one job called "build_documentation"

# This workflow contains one job called "update_version"
jobs:
update_version:
# The type of runner that the job will run on
runs-on: windows-2022

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Runs a set of commands using the runners shell
steps:
# Support longpaths
- name: Support long paths
run: git config --system core.longpaths true

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v7
with:
fetch-depth: '1'

# Compute pre-release tags with dash (used by nuspec, csproj, props)
# psd1 uses the raw input directly (no dash)
- name: Compute pre-release tags
run: |
$preC = if ('${{ inputs.PreReleaseCurrentVersion }}') { '-${{ inputs.PreReleaseCurrentVersion }}' } else { '' }
$preN = if ('${{ inputs.PreReleaseNewVersion }}') { '-${{ inputs.PreReleaseNewVersion }}' } else { '' }
echo "PRE_C=$preC" >> $env:GITHUB_ENV
echo "PRE_N=$preN" >> $env:GITHUB_ENV

# pom.xml: no pre-release, version only
- run: (Get-Content ${{ github.workspace }}\src\jvm\netpdf\pom.xml).Replace('<netpdfversion>${{ inputs.CurrentVersion }}.0</netpdfversion>', '<netpdfversion>${{ inputs.NewVersion }}.0</netpdfversion>') | Set-Content ${{ github.workspace }}\src\jvm\netpdf\pom.xml

- run: (Get-Content ${{ github.workspace }}\src\net\Common\Common.props).Replace('<Version>${{ inputs.CurrentVersion }}.0${{ inputs.PreReleaseCurrentVersion }}</Version>', '<Version>${{ inputs.NewVersion }}.0${{ inputs.PreReleaseNewVersion }}</Version>') | Set-Content ${{ github.workspace }}\src\net\Common\Common.props

- run: (Get-Content ${{ github.workspace }}\src\net\NetPDFCLI\NetPDFCLI.nuspec).Replace('<version>${{ inputs.CurrentVersion }}${{ inputs.PreReleaseCurrentVersion }}</version>', '<version>${{ inputs.NewVersion }}${{ inputs.PreReleaseNewVersion }}</version>') | Set-Content ${{ github.workspace }}\src\net\NetPDFCLI\NetPDFCLI.nuspec
# Common.props: uses dash-prefixed pre-release tag
- run: (Get-Content ${{ github.workspace }}\src\net\Common\Common.props).Replace('<Version>${{ inputs.CurrentVersion }}.0${{ env.PRE_C }}</Version>', '<Version>${{ inputs.NewVersion }}.0${{ env.PRE_N }}</Version>') | Set-Content ${{ github.workspace }}\src\net\Common\Common.props

# nuspec files: uses dash-prefixed pre-release tag
- run: (Get-Content ${{ github.workspace }}\src\net\NetPDFCLI\NetPDFCLI.nuspec).Replace('<version>${{ inputs.CurrentVersion }}${{ env.PRE_C }}</version>', '<version>${{ inputs.NewVersion }}${{ env.PRE_N }}</version>') | Set-Content ${{ github.workspace }}\src\net\NetPDFCLI\NetPDFCLI.nuspec

# psd1 files: ModuleVersion and Prerelease are updated separately
# ModuleVersion accepts only numeric version, Prerelease uses raw input (no dash)
- name: Update MASES.NetPDFPS.psd1
run: |
$f = '${{ github.workspace }}\src\net\NetPDFPS\MASES.NetPDFPS.psd1'
(Get-Content $f).
Replace("ModuleVersion = '${{ inputs.CurrentVersion }}'", "ModuleVersion = '${{ inputs.NewVersion }}'").
Replace("Prerelease = '${{ inputs.PreReleaseCurrentVersion }}'", "Prerelease = '${{ inputs.PreReleaseNewVersion }}'") |
Set-Content $f

- name: Update MASES.NetPDFPSCore.psd1
run: |
$f = '${{ github.workspace }}\src\net\NetPDFPS\MASES.NetPDFPSCore.psd1'
(Get-Content $f).
Replace("ModuleVersion = '${{ inputs.CurrentVersion }}'", "ModuleVersion = '${{ inputs.NewVersion }}'").
Replace("Prerelease = '${{ inputs.PreReleaseCurrentVersion }}'", "Prerelease = '${{ inputs.PreReleaseNewVersion }}'") |
Set-Content $f

- name: Update MASES.NetPDFPSFramework.psd1
run: |
$f = '${{ github.workspace }}\src\net\NetPDFPS\MASES.NetPDFPSFramework.psd1'
(Get-Content $f).
Replace("ModuleVersion = '${{ inputs.CurrentVersion }}'", "ModuleVersion = '${{ inputs.NewVersion }}'").
Replace("Prerelease = '${{ inputs.PreReleaseCurrentVersion }}'", "Prerelease = '${{ inputs.PreReleaseNewVersion }}'") |
Set-Content $f

- run: (Get-Content ${{ github.workspace }}\src\net\NetPDFPS\MASES.NetPDFPS.psd1).Replace('${{ inputs.CurrentVersion }}${{ inputs.PreReleaseCurrentVersion }}', '${{ inputs.NewVersion }}${{ inputs.PreReleaseNewVersion }}') | Set-Content ${{ github.workspace }}\src\net\NetPDFPS\MASES.NetPDFPS.psd1
- run: (Get-Content ${{ github.workspace }}\src\net\NetPDFPS\MASES.NetPDFPSCore.psd1).Replace('${{ inputs.CurrentVersion }}${{ inputs.PreReleaseCurrentVersion }}', '${{ inputs.NewVersion }}${{ inputs.PreReleaseNewVersion }}') | Set-Content ${{ github.workspace }}\src\net\NetPDFPS\MASES.NetPDFPSCore.psd1
- run: (Get-Content ${{ github.workspace }}\src\net\NetPDFPS\MASES.NetPDFPSFramework.psd1).Replace('${{ inputs.CurrentVersion }}${{ inputs.PreReleaseCurrentVersion }}', '${{ inputs.NewVersion }}${{ inputs.PreReleaseNewVersion }}') | Set-Content ${{ github.workspace }}\src\net\NetPDFPS\MASES.NetPDFPSFramework.psd1
# csproj templates: uses dash-prefixed pre-release tag
- run: (Get-Content ${{ github.workspace }}\src\net\templates\templates\netpdfApp\netpdfApp.csproj).Replace('${{ inputs.CurrentVersion }}${{ env.PRE_C }}', '${{ inputs.NewVersion }}${{ env.PRE_N }}') | Set-Content ${{ github.workspace }}\src\net\templates\templates\netpdfApp\netpdfApp.csproj

- run: (Get-Content ${{ github.workspace }}\src\net\templates\templates\netpdfApp\netpdfApp.csproj).Replace('${{ inputs.CurrentVersion }}${{ inputs.PreReleaseCurrentVersion }}', '${{ inputs.NewVersion }}${{ inputs.PreReleaseNewVersion }}') | Set-Content ${{ github.workspace }}\src\net\templates\templates\netpdfApp\netpdfApp.csproj

- name: Request a PR to commit changes
uses: peter-evans/create-pull-request@v8
with:
branch-suffix: short-commit-hash
add-paths: src/*.*
commit-message: Update version from ${{ inputs.CurrentVersion }}${{ inputs.PreReleaseCurrentVersion }} to ${{ inputs.NewVersion }}${{ inputs.PreReleaseNewVersion }}
title: Update version from ${{ inputs.CurrentVersion }}${{ inputs.PreReleaseCurrentVersion }} to ${{ inputs.NewVersion }}${{ inputs.PreReleaseNewVersion }}
commit-message: Update version from ${{ inputs.CurrentVersion }}${{ env.PRE_C }} to ${{ inputs.NewVersion }}${{ env.PRE_N }}
title: Update version from ${{ inputs.CurrentVersion }}${{ env.PRE_C }} to ${{ inputs.NewVersion }}${{ env.PRE_N }}
body: |
Automated changes by GitHub action fix #47
reviewers: masesdevelopers
assignees: masesdevelopers
labels: enhancement, Docker, java, NetPDF, NetPDF CLI, NetPDF PowerShell, NetPDF Template, .NET
labels: enhancement, Docker, java, NetPDF, NetPDF CLI, NetPDF PowerShell, NetPDF Template, .NET
1 change: 1 addition & 0 deletions src/documentation/docfx.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"metadata": [
{
"filter": "filterConfig.yml",
"src": [
{
"files": [ "**.csproj" ],
Expand Down
13 changes: 13 additions & 0 deletions src/documentation/filterConfig.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiRules:
- exclude:
uidRegex: ^System\.Exception
type: Member
- exclude:
uidRegex: ^System\.Object
type: Member
- exclude:
uidRegex: ^MASES\.JCOBridge\.
type: Member
- exclude:
uidRegex: ^System\.Dynamic\.DynamicObject
type: Member
2 changes: 1 addition & 1 deletion src/jvm/netpdf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<maven.compiler.target>${java.version}</maven.compiler.target>
<classpathfile>${basedir}/classpathfile.classpath</classpathfile>
<mavenSkipMain>false</mavenSkipMain> <!-- set mavenSkipMain to true to avoid source compilation: use directive in command-line -->
<jnetVersion>2.6.6.0</jnetVersion>
<jnetVersion>2.6.9.0</jnetVersion>
<pdfBoxVersion>3.0.7</pdfBoxVersion>
<netpdfversion>3.0.10.0</netpdfversion>
<rootDir>${basedir}/../../../</rootDir>
Expand Down
8 changes: 0 additions & 8 deletions src/net/Common/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,6 @@
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<!-- Fix start https://github.com/dotnet/sourcelink/issues/572 -->
<PropertyGroup>
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
</PropertyGroup>
<ItemGroup>
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)" />
</ItemGroup>
<!-- Fix end -->
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
Expand Down
9 changes: 9 additions & 0 deletions src/net/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project>
<!-- Fix https://github.com/dotnet/sourcelink/issues/572 -->
<PropertyGroup>
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
</PropertyGroup>
<ItemGroup>
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)" />
</ItemGroup>
</Project>
8 changes: 8 additions & 0 deletions src/net/NetPDF/Generated/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[*.cs]
generated_code = true
dotnet_analyzer_diagnostic.severity = none
dotnet_diagnostic.CS0108.severity = none
dotnet_diagnostic.CS0114.severity = none
dotnet_diagnostic.CS0419.severity = none
dotnet_diagnostic.CS1574.severity = none
dotnet_diagnostic.CS0612.severity = none
2 changes: 1 addition & 1 deletion src/net/NetPDF/NetPDF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<None Remove="Specific\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MASES.JNet" Version="2.6.6">
<PackageReference Include="MASES.JNet" Version="2.6.9">
<IncludeAssets>All</IncludeAssets>
<PrivateAssets>None</PrivateAssets>
</PackageReference>
Expand Down
2 changes: 2 additions & 0 deletions src/net/NetPDFPS/MASES.NetPDFPS.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ PrivateData = @{

PSData = @{

Prerelease = ''

Tags = @('NetPDFPS', 'NetPDF', 'PSEdition_Core', 'PSEdition_Desktop', 'Windows', 'Linux', 'JVM', 'Java', 'PDFBox', 'PDF', 'bridge', 'gateway')

LicenseUri = 'https://github.com/masesgroup/NetPDF/blob/master/LICENSE'
Expand Down
4 changes: 3 additions & 1 deletion src/net/NetPDFPS/MASES.NetPDFPSCore.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ PrivateData = @{

PSData = @{

Tags = @('NetPDFPS', 'NetPDF', 'PSEdition_Core', 'PSEdition_Desktop', 'Windows', 'Linux', 'JVM', 'Java', 'PDFBox', 'PDF', 'bridge', 'gateway')
Prerelease = ''

Tags = @('NetPDFPS', 'NetPDF', 'PSEdition_Core', 'Windows', 'Linux', 'JVM', 'Java', 'PDFBox', 'PDF', 'bridge', 'gateway')

LicenseUri = 'https://github.com/masesgroup/NetPDF/blob/master/LICENSE'

Expand Down
4 changes: 3 additions & 1 deletion src/net/NetPDFPS/MASES.NetPDFPSFramework.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ PrivateData = @{

PSData = @{

Tags = @('NetPDFPS', 'NetPDF', 'PSEdition_Core', 'PSEdition_Desktop', 'Windows', 'Linux', 'JVM', 'Java', 'PDFBox', 'PDF', 'bridge', 'gateway')
Prerelease = ''

Tags = @('NetPDFPS', 'NetPDF', 'PSEdition_Desktop', 'Windows', 'Linux', 'JVM', 'Java', 'PDFBox', 'PDF', 'bridge', 'gateway')

LicenseUri = 'https://github.com/masesgroup/NetPDF/blob/master/LICENSE'

Expand Down
Loading