mirror of
https://github.com/Ed94/gencpp.git
synced 2024-12-22 07:44:45 -08:00
updates on package_release.ps1 and clean.ps1
This commit is contained in:
parent
913d9bf26b
commit
c0aa4fee95
@ -4,6 +4,9 @@ Import-Module $misc
|
||||
$path_root = Get-ScriptRepoRoot
|
||||
$path_base = Join-Path $path_root base
|
||||
$path_base_build = Join-Path $path_base build
|
||||
$path_c_library = Join-Path $path_root gen_c_library
|
||||
$path_c_library_build = Join-Path $gen_c_library build
|
||||
$path_c_library_gen = Join-Path $gen_c_library gen
|
||||
$path_segmented = Join-Path $path_root gen_segmented
|
||||
$path_segmented_build = Join-Path $path_segmented build
|
||||
$path_segmented_gen = Join-Path $path_segmented gen
|
||||
@ -25,6 +28,12 @@ if ( Test-Path $path_base_build) {
|
||||
if ( Test-Path $path_segmented_build) {
|
||||
Remove-Item $path_segmented_build -Recurse -Verbose
|
||||
}
|
||||
if ( Test-Path $path_c_library_gen ) {
|
||||
Remove-Item $path_segmented_gen -Recurse -Verbose
|
||||
}
|
||||
if ( Test-Path $path_segmented_build) {
|
||||
Remove-Item $path_segmented_build -Recurse -Verbose
|
||||
}
|
||||
if ( Test-Path $path_segmented_gen ) {
|
||||
Remove-Item $path_segmented_gen -Recurse -Verbose
|
||||
}
|
||||
|
@ -1,21 +1,25 @@
|
||||
cls
|
||||
$misc = Join-Path $PSScriptRoot 'helpers/misc.psm1'
|
||||
Import-Module $misc
|
||||
|
||||
$build = Join-Path $PSScriptRoot 'build.ci.ps1'
|
||||
|
||||
if ( $IsWindows ) {
|
||||
& $build release msvc bootstrap singleheader unreal msvc debug
|
||||
& $build release msvc base segmented singleheader unreal c_library msvc debug
|
||||
}
|
||||
else {
|
||||
& $build release clang bootstrap singleheader unreal msvc debug
|
||||
& $build release clang base segmented singleheader unreal c_library msvc debug
|
||||
}
|
||||
|
||||
$path_root = git rev-parse --show-toplevel
|
||||
$path_root = Get-ScriptRepoRoot
|
||||
$path_docs = Join-Path $path_root docs
|
||||
$path_project = Join-Path $path_root project
|
||||
$path_project_gen = Join-Path $path_project gen
|
||||
$path_singleheader = Join-Path $path_root singleheader
|
||||
$path_base = Join-Path $path_root base
|
||||
$path_c_library = Join-Path $path_root gen_c_library
|
||||
$path_c_library_gen = Join-Path $gen_c_library gen
|
||||
$path_segmented = Join-Path $path_root gen_segmented
|
||||
$path_segmented_gen = Join-Path $path_segmented gen
|
||||
$path_singleheader = Join-Path $path_root gen_singleheader
|
||||
$path_singleheader_gen = Join-Path $path_singleheader gen
|
||||
$path_unreal = Join-Path $path_root unreal_engine
|
||||
$path_unreal = Join-Path $path_root gen_unreal_engine
|
||||
$path_unreal_gen = Join-Path $path_unreal gen
|
||||
$path_release = Join-Path $path_root release
|
||||
$path_release_content = Join-Path $path_release content
|
||||
@ -47,33 +51,50 @@ function prep-ReleaseContent()
|
||||
|
||||
# Singleheader
|
||||
prep-ReleaseContent
|
||||
Copy-Item -Path $path_singleheader\Readme.md -Destination $path_release_content\Readme.md
|
||||
Copy-Item -Path $path_singleheader_gen\gen.hpp -Destination $path_release_content\gen.hpp
|
||||
Compress-Archive -Path $path_release_content\* -DestinationPath $path_release\gencpp_singleheader.zip -Force
|
||||
Remove-Item -Path $path_release_content -Recurse
|
||||
|
||||
# Segmented
|
||||
prep-ReleaseContent
|
||||
Copy-Item -Path $path_project_gen\* -Destination $path_release_content
|
||||
Copy-Item -Path $path_segmented\Readme.md -Destination $path_release_content\Readme.md
|
||||
Copy-Item -Path $path_segmented_gen\* -Destination $path_release_content
|
||||
Compress-Archive -Path $path_release_content\* -DestinationPath $path_release\gencpp_segmented.zip -Force
|
||||
Remove-Item -Path $path_release_content -Recurse
|
||||
|
||||
# Unreal
|
||||
prep-ReleaseContent
|
||||
Copy-Item -Path $path_unreal\Readme.md -Destination $path_release_content\Readme.md
|
||||
Copy-Item -Path $path_unreal_gen\* -Destination $path_release_content
|
||||
Compress-Archive -Path $path_release_content\* -DestinationPath $path_release\gencpp_unreal.zip -Force
|
||||
Remove-Item -Path $path_release_content -Recurse
|
||||
|
||||
# As Is
|
||||
# C Library Singleheader
|
||||
prep-ReleaseContent
|
||||
Copy-Item -Path $path_c_library\Readme.md -Destination $path_release_content\Readme.md
|
||||
Copy-Item -Path $path_c_library_gen\gen_singleheader.hpp -Destination $path_release_content\gen.hpp
|
||||
Compress-Archive -Path $path_release_content\* -DestinationPath $path_release\gencpp_c11_singleheader.zip -Force
|
||||
Remove-Item -Path $path_release_content -Recurse
|
||||
|
||||
# C Library Segmented
|
||||
prep-ReleaseContent
|
||||
Copy-Item -Path $path_c_library\Readme.md -Destination $path_release_content\Readme.md
|
||||
Copy-Item -Path $path_unreal_gen\* -Destination $path_release_content
|
||||
Compress-Archive -Path $path_release_content\* -DestinationPath $path_release\gencpp_c11_segmented.zip -Force
|
||||
Remove-Item -Path $path_release_content -Recurse
|
||||
|
||||
# Base
|
||||
|
||||
prep-ReleaseContent
|
||||
Copy-Item -Verbose -Path $path_project\gen.hpp -Destination $path_release_content
|
||||
Copy-Item -Verbose -Path $path_project\gen.cpp -Destination $path_release_content
|
||||
Copy-Item -Verbose -Path $path_project\gen.dep.hpp -Destination $path_release_content
|
||||
Copy-Item -Verbose -Path $path_project\gen.dep.cpp -Destination $path_release_content
|
||||
Copy-Item -Verbose -Path $path_project\auxillary\builder.hpp -Destination $path_release_content\auxillary
|
||||
Copy-Item -Verbose -Path $path_project\auxillary\builder.cpp -Destination $path_release_content\auxillary
|
||||
Copy-Item -Verbose -Path $path_project\auxillary\scanner.hpp -Destination $path_release_content\auxillary
|
||||
Copy-Item -Verbose -Path $path_project\auxillary\scanner.cpp -Destination $path_release_content\auxillary
|
||||
Copy-Item -Verbose -Path $path_base\gen.hpp -Destination $path_release_content
|
||||
Copy-Item -Verbose -Path $path_base\gen.cpp -Destination $path_release_content
|
||||
Copy-Item -Verbose -Path $path_base\gen.dep.hpp -Destination $path_release_content
|
||||
Copy-Item -Verbose -Path $path_base\gen.dep.cpp -Destination $path_release_content
|
||||
Copy-Item -Verbose -Path $path_base\auxillary\builder.hpp -Destination $path_release_content\auxillary
|
||||
Copy-Item -Verbose -Path $path_base\auxillary\builder.cpp -Destination $path_release_content\auxillary
|
||||
Copy-Item -Verbose -Path $path_base\auxillary\scanner.hpp -Destination $path_release_content\auxillary
|
||||
Copy-Item -Verbose -Path $path_base\auxillary\scanner.cpp -Destination $path_release_content\auxillary
|
||||
|
||||
New-Item -ItemType Directory -Force -Path "$path_release_content\components"
|
||||
New-Item -ItemType Directory -Force -Path "$path_release_content\components\gen"
|
||||
@ -87,5 +108,5 @@ Get-ChildItem -Verbose -Path "$path_project\dependencies\*" -Include *.cpp,*.h
|
||||
Get-ChildItem -Verbose -Path "$path_project\enums\*" -Include *.csv | Copy-Item -Destination "$path_release_content\enums"
|
||||
Get-ChildItem -Verbose -Path "$path_project\helpers\*" -Include *.cpp,*.hpp | Copy-Item -Destination "$path_release_content\helpers"
|
||||
|
||||
Compress-Archive -Path $path_release_content\** -DestinationPath $path_release\gencpp_as_is.zip -Force
|
||||
Compress-Archive -Path $path_release_content\** -DestinationPath $path_release\gencpp_base.zip -Force
|
||||
Remove-Item -Path $path_release_content -Recurse
|
||||
|
Loading…
Reference in New Issue
Block a user