Skip to content

Minimal working example #89

@stemann

Description

@stemann

I'm trying out PackageBundler, and I'm not completely sure I'm getting the proper output in build.

Should the following instructions yield a MWE? The following MWE might be useful.

  1. Generate a PackageBundler project in ExampleBundle:
julia --eval '
  import Pkg
  Pkg.activate(; temp = true)
  Pkg.add(; url = "https://github.com/PumasAI/PackageBundler.jl")
  import PackageBundler
  PackageBundler.generate(joinpath(pwd(), "ExampleBundle"))
'
  1. Generate an environment in ExampleBundle/environments/ExampleEnv (Serialization is required to be in env.):
cd ExampleBundle

mkdir -p environments/ExampleEnv

cat <<EOT > environments/ExampleEnv/Project.toml
[deps]
Example = "7876af07-990d-54b4-ab0e-23690620f79a"
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
EOT

julia --project=environments/ExampleEnv --eval '
  using Pkg
  Pkg.instantiate()
'
  1. Adapt the generated ExampleBundle/PackageBundler.toml to strip code from Example from General:
cat <<EOT > PackageBundler.toml
name = "ExampleBundle"
uuid = "f3c4f87b-1a1f-6f7f-c170-8f556c78b68b"
environments = [
    "environments/ExampleEnv",
]
outputs = ["build"]
key = "key"
clean = true
multiplexers = ["juliaup", "asdf"]

# Registries that you want to strip code from.
# [registries]

# Packages that you want to strip code from.
[packages]
"7876af07-990d-54b4-ab0e-23690620f79a" = "Example"
EOT
  1. Generate keys:
julia --project --eval '
  import PackageBundler
  PackageBundler.keypair(pwd())
'
  1. Bundle ExampleBundle (ExampleEnv) into build:
julia --project bundle.jl

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions