Project: Buildpacks (App Definition and Development / Application Definition & Image Build)
File: DEVELOPMENT.md

* macOS: (built-in) Windows: `choco install git -y` `git config --global core.autocrlf false` * macOS: `brew install go` Windows: `choco install golang -y` Make (and build tools) macOS: `xcode-select --install` Windows: `choco install cygwin make -y` `[Environment]::SetEnvironmentVariable("PATH", "C:\tools\cygwin\bin;$ENV:PATH", "MACHINE")` Alternatively, you can use Gitpod to run pre-configured dev environment in the cloud right from your browser ](https://gitpod.io/#https://github.com/buildpacks/pack) Symlinks - Some of our tests attempt to create symlinks. On Windows, this requires the . To build pack: ``` make build ``` This will output the binary to the directory `out/`. Options: | ENV_VAR | Description | Default | |--||| | GOCMD | Change the `go` executable. For example, for testing. | go | | PACK_BIN | Change the name or location of the binary relative to `out/`. | pack | | PACK_VERSION | Tell `pack` what version to consider itself | `dev` | NOTE: This project uses for dependency management. To run unit and integration tests: ```shell make unit ``` Test output will be streamed to your terminal and also saved to the file out/unit To run acceptance tests: ```shell make acceptance ``` Test output will be streamed to your terminal and also saved to the file out/acceptance Alternately, to run all tests: ```shell make test ``` To run our full acceptance suite (including cross-compatibility for n-1 `pack` and `lifecycle`): ```shell make acceptance-all ``` To format the code: ```shell make format ``` To tidy up the codebase and dependencies: ```shell make tidy ``` To verify formatting and code quality: ```shell make verify ``` Runs various checks to ensure compliance: ```shell make prepare-for-pr ``` Some options users can provide to our acceptance tests are: | ENV_VAR | Description | Default | |--||| | ACCEPTANCESUITECONFIG | A set of configurations for how to run the acceptance tests, describing the version of `pack` used for testing, the version of `pack` used to create the builders used in the test, and the version of `lifecycle` binaries used to test with Github | `[{"pack": "current", "packcreatebuilder": "current", "lifecycle": "default"}]'` | | COMPILEPACKWITH_VERSION | Tell `pack` what version to consider itself | `dev` | | GITHUB_TOKEN | A Github Token, used when downloading `pack` and `lifecycle` releases from Github during the test setup | "" | | LIFECYCLE_IMAGE | Image reference to be used in untrusted builder workflows | buildpacksio/lifecycle:<lifecycle version> | | LIFECYCLE_PATH | Path to a `.tgz` file filled with a set of `lifecycle` binaries | The Github release for the default version of lifecycle in `pack` | | PACK_PATH | Path to a `pack` executable. | A compiled version of the current branch | | PREVIOUSLIFECYCLEIMAGE | Image reference to be used in untrusted builder workflows, used to test compatibility of `pack` with the n-1 version of the `lifecycle` | buildpacksio/lifecycle:<PREVIOUSLIFECYCLEPATH lifecycle version>, buildpacksio/lifecycle:<n-1 lifecycle version> | | PREVIOUSLIFECYCLEPATH | Path to a `.tgz` file filled with a set of `lifecycle` binaries, used to test compatibility of `pack` with the n-1 version of the `lifecycle` | The Github release for n-1 release of `lifecycle` | | PREVIOUSPACKFIXTURESPATH | Path to a set of fixtures, used to override the most up-to-date fixtures, in case of changed functionality | `acceptance/testdata/packpreviousfixturesoverrides` | | PREVIOUSPACKPATH | Path to a `pack` executable, used to test compatibility with n-1 version of `pack` | The most recent release from `pack`'s Github release |