devcontainers-contrib / nanolayer

45 stars 15 forks source link

Install multiple exes from a GH Release #46

Closed ross-p-smith closed 1 year ago

ross-p-smith commented 1 year ago

Hi there,

I'm struggling with copying 2 executables to a dev container from the same Github Release - can you help as I cant have multiple features with the same key in a devcontainer.json - so I need to get it working where it copies both files

        "ghcr.io/devcontainers-contrib/features/gh-release:1": {
            "repo": "Azure/apiops",
            "version": "v4.7.0",
            "binaryNames": "extractor",
            "assetRegex": "^(extractor.linux-x64.exe)"
        }

Above is working for the extractor, but I need to get the publisher too - can you help me define the syntax?

ross-p-smith commented 1 year ago

@danielbraun89 - I don't suppose you could help on this one could you as the ghcr.io/devcontainers-contrib/features/gh-release has a strong dependency on this repo

danielbraun89 commented 1 year ago

@ross-p-smith Thanks for reporting this! Your syntax seems to be correct! But an unrelated bug in nanolayer caused problems: Azure/apiops repo contained some un-standard release names that begins with a dor. it threw off the natural sorting which is resolving the latest version

image

The release version that was picked (v.2.1.0) did not contain any assets, therefore installation failed to continue.

this was fixed in nanolayer 0.5.2 , and will be fixed also in the next release of gh-release devcontainer feature

Note: while this will fix the installation of the "extractor" asset, there is currently no way to extract multiple assets from the same release. (This requires running the nanolayer install gh-release twice)
This is not a problem on its own. In a devcontainer however, features cannot repeat themselves so it will be difficult for you to install both the extractor and publisher asset in the same devcontainer

This may be a reason to create a new feature dedicated to installation of them both

danielbraun89 commented 1 year ago

@ross-p-smith So I have added an azure apiops feature called ghcr.io/devcontainers-contrib/features/azure-apiops that will install both extractor and publisher As for multiple exe installation - ill close this as "not planned" - not because its not a legitimate request (its very much is!) but because this should be handled in another scope (improving devcontainer to be able install the same feature twice )