Skip to content

Commit

Permalink
refactor(build): 👷 update PowerShell build script after URI QR codes …
Browse files Browse the repository at this point in the history
…build tools replacement

#122
  • Loading branch information
sergey-s-betke committed Aug 12, 2024
1 parent 3536d34 commit 126103a
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 98 deletions.
5 changes: 1 addition & 4 deletions .build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ task UnpackAndOptimizeModified $OOUnpackAndOptimizeTasks;
# Synopsis: Удаляет каталоги с временными файлами, собранными файлами документов и их шаблонов
task clean {
Invoke-Build clean -File $SourceLibrariesPath/MacroLibs.build.ps1 @parameters;
Invoke-Build clean -File $SourceURIsPath/QRCodes.URI.build.ps1 @parameters;
Invoke-Build clean -File $SourceXCardPath/QRCodes.xCards.build.ps1 @parameters;
Invoke-Build clean -File $SourceTemplatesPath/OpenDocumentTemplates.build.ps1 @parameters;
Invoke-Build clean -File $SourceDocumentsPath/Documents.build.ps1 @parameters;
Expand All @@ -114,7 +113,6 @@ task clean {

task distclean clean, {
Invoke-Build distclean -File $SourceLibrariesPath/MacroLibs.build.ps1 @parameters;
Invoke-Build distclean -File $SourceURIsPath/QRCodes.URI.build.ps1 @parameters;
Invoke-Build distclean -File $SourceXCardPath/QRCodes.xCards.build.ps1 @parameters;
Invoke-Build distclean -File $SourceTemplatesPath/OpenDocumentTemplates.build.ps1 @parameters;
Invoke-Build distclean -File $SourceDocumentsPath/Documents.build.ps1 @parameters;
Expand All @@ -128,7 +126,6 @@ task maintainer-clean distclean, {

task pre-build nuget, {
Invoke-Build pre-build -File $SourceLibrariesPath/MacroLibs.build.ps1 @parameters;
Invoke-Build pre-build -File $SourceURIsPath/QRCodes.URI.build.ps1 @parameters;
Invoke-Build pre-build -File $SourceXCardPath/QRCodes.xCards.build.ps1 @parameters;
Invoke-Build pre-build -File $SourceTemplatesPath/OpenDocumentTemplates.build.ps1 @parameters;
Invoke-Build pre-build -File $SourceDocumentsPath/Documents.build.ps1 @parameters;
Expand All @@ -146,7 +143,7 @@ task BuildLibContainers {

# Synopsis: Создаёт файлы с изображениями QR кодов (с URL)
task BuildUriQRCodes {
Invoke-Build BuildUriQRCodes -File $SourceURIsPath/QRCodes.URI.build.ps1 @parameters;
. npx gulp build:URL-QRCodes;
};

# Synopsis: Создаёт vCard из xCard
Expand Down
78 changes: 0 additions & 78 deletions src/QRCodes/URIs/QRCodes.URI.build.ps1

This file was deleted.

4 changes: 0 additions & 4 deletions src/QRCodes/URIs/rustest.spb.ru.url

This file was deleted.

8 changes: 5 additions & 3 deletions src/common.build.shared.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ if ( -not ( Test-Path variable:RepoRootPath ) -or ( [System.String]::IsNullOrEmp

[System.String] $TempPath = ( Join-Path -Path $RepoRootPath -ChildPath 'tmp' );
[System.String] $DestinationVCardPath = ( Join-Path -Path $TempPath -ChildPath 'vCards' );
[System.String] $DestinationQRCodesPath = ( Join-Path -Path $TempPath -ChildPath 'QRCodes' );
[System.String] $DestinationQRCodesURIPath = ( Join-Path -Path $DestinationQRCodesPath -ChildPath 'URIs' );
[System.String] $DestinationQRCodesVCardPath = ( Join-Path -Path $DestinationQRCodesPath -ChildPath 'vCards' );

[System.String] $DestinationLibContainersPath = ( Join-Path -Path $TempPath -ChildPath 'basic' );
[System.String] $PreprocessedTemplatesPath = ( Join-Path -Path $TempPath -ChildPath 'template' );
[System.String] $PreprocessedDocumentsPath = ( Join-Path -Path $TempPath -ChildPath 'doc' );
Expand All @@ -34,6 +32,10 @@ if ( -not ( Test-Path variable:RepoRootPath ) -or ( [System.String]::IsNullOrEmp

[System.String] $ImagesPNGPath = ( Join-Path -Path $ImagesPath -ChildPath 'png' -Resolve );

[System.String] $DestinationQRCodesPath = $ImagesPNGPath;
[System.String] $DestinationQRCodesURIPath = $ImagesPNGPath;
[System.String] $DestinationQRCodesVCardPath = $ImagesPNGPath;

[System.String] $DestinationPath = ( Join-Path -Path $RepoRootPath -ChildPath 'output' );
[System.String] $DestinationLibrariesPath = ( Join-Path -Path $DestinationPath -ChildPath 'basic' );
[System.String] $DestinationTemplatesPath = ( Join-Path -Path $DestinationPath -ChildPath 'template' );
Expand Down
Binary file removed src/images/png/org-qr.png
Binary file not shown.
Binary file removed src/images/png/rustest.spb.ru.png
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<manifest:file-entry manifest:full-path="manifest.rdf" manifest:media-type="application/rdf+xml"/>
<manifest:file-entry manifest:full-path="meta.xml" manifest:media-type="text/xml"/>
<manifest:file-entry manifest:full-path="Pictures/org-logo.png" manifest:media-type="image/png"/>
<manifest:file-entry manifest:full-path="Pictures/org-qr.png" manifest:media-type="image/png"/>
<manifest:file-entry manifest:full-path="Pictures/org-site.png" manifest:media-type="image/png"/>
<manifest:file-entry manifest:full-path="Pictures/rst.png" manifest:media-type="image/png"/>
<manifest:file-entry manifest:full-path="Pictures/ruler.png" manifest:media-type="image/png"/>
<manifest:file-entry manifest:full-path="Pictures/rst.wmf" manifest:media-type="image/x-wmf"/>
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ task BuildLib-DocTemplatesLib {
Invoke-Build BuildLib -File $SourceLibrariesPath/DocTemplatesLib/DocTemplatesLib.build.ps1 @parameters;
};

task Build-rustest.spb.ru.png {
Invoke-Build Build-rustest.spb.ru.png -File $SourceURIsPath/QRCodes.URI.build.ps1 @parameters;
task Build-org-site.png {
. npx gulp build:URL-QRCodes;
};

task rustest.spb.ru.png `
-Inputs @( "$DestinationQRCodesURIPath/rustest.spb.ru.png" ) `
-Outputs @( "$SourceTemplatePath/Pictures/org-qr.png" ) `
-Jobs Build-rustest.spb.ru.png, {
task org-site.png `
-Inputs @( "$DestinationQRCodesURIPath/org-site.png" ) `
-Outputs @( "$SourceTemplatePath/Pictures/org-site.png" ) `
-Jobs Build-org-site.png, {
Copy-Item -LiteralPath $Inputs[0] -Destination $Outputs[0] -Force `
-Verbose:( $PSCmdlet.MyInvocation.BoundParameters['Verbose'] -eq $true );
};
Expand Down Expand Up @@ -73,7 +73,7 @@ openDocumentTemplate BuildTemplate `
-Version $Version `
-Inputs $sources `
-Outputs @( $DestinationTemplatePath, $marker ) `
-Jobs BuildLib-DocTemplatesLib, rustest.spb.ru.png, russian_emblem.png, org_logo.png;
-Jobs BuildLib-DocTemplatesLib, org-site.png, russian_emblem.png, org_logo.png;

openDocumentTemplate BuildAndOpenTemplate `
-OpenAfterBuild `
Expand All @@ -83,6 +83,6 @@ openDocumentTemplate BuildAndOpenTemplate `
-Version $Version `
-Inputs $sources `
-Outputs @( $DestinationTemplatePath, $marker ) `
-Jobs BuildLib-DocTemplatesLib, rustest.spb.ru.png, russian_emblem.png, org_logo.png;
-Jobs BuildLib-DocTemplatesLib, org-site.png, russian_emblem.png, org_logo.png;

task . BuildTemplate;

0 comments on commit 126103a

Please sign in to comment.