What is the 'tree' hash mentioned in the build?
Matthias Van Woensel
Unique builds
When you start a build platform mentions something like
Building application 'application' (runtime type: php:7.4, tree: 4d307e3)
That tree is used by Platform to determine if we can re-use a previous build or not. Usually you would test a build first on staging or a development branch. When you later merge with your production branch, we no longer need to rebuild since the tree hash will match.
How is the hash generated?
Sometimes it is useful to match the tree hash on your development machine with the build on platform. This is how you would generate it:
git ls-tree HEAD . | grep -v "\\.platform\$" | grep -v "\\.platform.app.yaml$" | git mktree
0
Comments
For a multi app project,
cd into the directory and run the command there:
(cd <your_app_directory>; git ls-tree HEAD . | grep -v "\\.platform\$" | grep -v "\\.platform.app.yaml$" | git mktreePlease sign in to leave a comment.