GitXplorerGitXplorer
M

package-bundler-provider-example

public
0 stars
0 forks
2 issues

Commits

List of commits on branch main.
Verified
41de6637a5b07aceac6a02f546ea7cd49a76b233

Merge pull request #11 from MichaelHatherly/mh/juliaup-overrides

MMichaelHatherly committed 9 months ago
Verified
d7e547f1e10ab401bbb39d317a7200158a50c6db

Use `juliaup override` to ensure copied environments use the right `julia`

MMichaelHatherly committed 9 months ago
Verified
a3237a2be41ac367da322693b254eb75a38f6bc2

Merge pull request #10 from MichaelHatherly/dependabot/github_actions/actions/checkout-4.1.4

MMichaelHatherly committed 9 months ago
Verified
0576427899f372152ec959290857fd9cda6a5489

Bump actions/checkout from 4.1.3 to 4.1.4

ddependabot[bot] committed 9 months ago
Verified
4da58b2f86ec9ee20fad28c07e48e36d6c881f5b

Merge pull request #9 from MichaelHatherly/create-pull-request/patch

MMichaelHatherly committed 9 months ago
Unverified
19622004ad0d4872e7f0aa512e8479f3fd3ac933

Update `Artifacts.toml` to version `1.0.2`

MMichaelHatherly committed 9 months ago

README

The README file for this repository.

PackageBundler.jl provider example

This repository contains example configuration for consuming a package bundler artifact generated via PackageBundler.jl.

Installation

[!TIP]

You need to have juliaup installed to be able to continue with this guide.

To install the bundled packages and environments that this package provides run the following:

[!IMPORTANT]

Windows Powershell

Copy and run the below code in a terminal:

julia --startup-file=no --project=@PackageBundlerProviderExample -e '
  import Pkg;
  Pkg.add(; url = \"https://github.com/MichaelHatherly/package-bundler-provider-example\");
  import PackageBundlerProviderExample;
  PackageBundlerProviderExample.install()
'
macOS and Linux Shells

Copy and run the below code in a terminal:

julia --startup-file=no --project=@PackageBundlerProviderExample -e '
  import Pkg;
  Pkg.add(; url = "https://github.com/MichaelHatherly/package-bundler-provider-example");
  import PackageBundlerProviderExample;
  PackageBundlerProviderExample.install()
'

Updating

To update the bundled packages and environments that this package provides run the following:

julia --startup-file=no --project=@PackageBundlerProviderExample -e '
  import Pkg;
  Pkg.update();
  import PackageBundlerProviderExample;
  PackageBundlerProviderExample.install()
'

Usage

The installation above adds several global environments to your Julia depot. These can be used via the --project=@ syntax as follows:

julia --project=@bundled@v1.1.0

[!WARNING]

Each bundled environment requires a specific julia version. Make sure to run julia with the correct channel, e.g.

julia +1.10.1 --project=@bundled@v1.0.0

Copying Bundled Environments

Bundled environments should be considered read-only. If you need to make changes to the environment, such as adding extra packages that are not included by default in a project's dependencies, you should copy the environment to a new location and make changes there using the copy function:

julia --project=@PackageBundlerProviderExample

julia> import PackageBundlerProviderExample

julia> PackageBundlerProviderExample.copy("bundled@v1.1.0", "my/custom/env")

Afterwards, you can use the copied environment as you would any other environment:

julia --project=my/custom/env

julia> ] add Some Extra Packages

Note that the included compat bounds in the Project.toml of the copied environment may restrict what versions of extra packages you are be able to add.

A juliaup override is applied to the copied environment's directory to ensure that the correct julia version is used when activating the environment regardless of what the user's default julia version is.

Removal

To remove the bundled packages and their environments run the following:

julia --startup-file=no --project=@PackageBundlerProviderExample -e '
  import PackageBundlerProviderExample;
  PackageBundlerProviderExample.remove()
'