Skip to content

Support loading for not archived binaries #21

@roxblnfk

Description

@roxblnfk

Add support for non-archived artifacts

Description

This PR adds the ability to download and process non-archived artifacts (direct binaries, executables, and other files) by implementing a NullArchive adapter in the Archive module.

Changes

  • Added NullArchive class implementing the Archive interface
  • Extended ArchiveFactory to support detection of non-archive files
  • Added fallback matcher to handle non-archived files
  • Added file type detection helper to distinguish between archives and non-archives
  • Updated documentation with examples of non-archived artifact usage

Motivation

Currently, DLOAD can only download artifacts that are packaged in archives. Many software projects distribute standalone binaries without archiving them, and we need to support these use cases.

Use Cases

  • Downloading direct executable binaries from GitHub releases
  • Processing non-compressed files from repositories
  • Supporting projects that distribute single-file artifacts

Implementation Details

  • NullArchive provides a pass-through implementation of the Archive interface
  • The extract() method yields the file as-is without unpacking
  • The system detects whether a file is an archive based on extension or explicit configuration
  • Maintains the same security and verification steps as with archived files

Examples

<!-- Example configuration for non-archived binary -->
<software name="Example Tool"
          alias="example-tool"
          binary="example-tool"
          description="Example standalone binary tool"
>
    <repository type="github"
                uri="example/tool"
                asset-pattern="/^example-tool.*/"
    />
    <file pattern="/^example-tool(?:\.exe)?$/"
          rename="example-tool"
    />
</software>

Testing

  • Added unit tests for NullArchive implementation
  • Added integration tests verifying download of non-archived files
  • Tested with real-world binaries from GitHub releases

Documentation

  • Updated user documentation with examples of non-archived artifact configuration
  • Added developer documentation explaining the NullArchive design

Related Issues

Closes #XX: Need to support non-archived binaries

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions