Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package Artifacts #7

Open
dlamkins opened this issue Sep 1, 2020 · 2 comments
Open

Package Artifacts #7

dlamkins opened this issue Sep 1, 2020 · 2 comments
Labels
documentation Improvements or additions to documentation.

Comments

@dlamkins
Copy link
Member

dlamkins commented Sep 1, 2020

This issue is to confirm the details surrounding the output package artifacts.

@dlamkins
Copy link
Member Author

dlamkins commented Sep 1, 2020

The active proposal is to mimic APT repositories by building an aggregate manifest (simply a list of all other manifests combined into a single JSON object). More in line with the APT method we'd include both a packages and packages.gz with every release. The GZip'd version (packages.gz) will help to ensure that the package list does not become prohibitively large as additional modules are added to the repository.

@dlamkins
Copy link
Member Author

dlamkins commented Sep 1, 2020

Both package artifacts can be built in a merge action. The raw packages file can be built using a query much like the below:

$PSDefaultParameterValues = @{ '*:Encoding' = 'utf8' }

$manifest = [System.Collections.ArrayList]@()

Get-ChildItem -Path .\ -Recurse -Filter *.json | ForEach-Object {
    $packageManifest = (Get-Content -Path $_.FullName | ConvertFrom-Json)

    [void]$manifest.Add($packageManifest)
}

(ConvertTo-Json $manifest -Depth 8 -Compress) | Write-Host

packages.gz can then be generated with something similar to gzip -f -k ./packages.

@dlamkins dlamkins added the documentation Improvements or additions to documentation. label Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation.
Projects
None yet
Development

No branches or pull requests

1 participant