techgaun / heroku-buildpack-subdir-to-root Goto Github PK
View Code? Open in Web Editor NEWA simple heroku buildpack to move sub directory to root of project
License: Apache License 2.0
A simple heroku buildpack to move sub directory to root of project
License: Apache License 2.0
As found in #5, if an error occurs during the compile of this buildpack, the build continues on regardless rather than failing.
Bash error on exit mode should be enabled to prevent this :-)
See:
http://redsymbol.net/articles/unofficial-bash-strict-mode/
Hi
I'm on the team that maintains Heroku's build system and official buildpacks, and wanted to let you know about a future incompatibility with this buildpack.
The directory in which the Heroku build system performs builds is currently a path like/tmp/build_<hash>
.
In the near future this path will be changing to /app
so that the build-time and run-time app locations are the same path - in order to resolve a number of long standing bugs and reduce the number of hacks buildpacks have to use to work around non-relocatable languages/toolchains.
One side-effect of this build directory change is that it will no longer be possible to rm -rf $BUILD_DIR
since that will now be equivalent to rm -rf /app
, and due to the way slugs are mounted inside a dyno, the /app
directory is read-only (not the contents of the directory, only the directory listing itself).
As such once this change comes into effect, builds using this buildpack will experience errors in the log (but the build will continue on, due to #7) like so:
remote: -----> Subdir to Root buildpack app detected
remote: Creating temp directory
remote: Created temp directory: /tmp/codon/tmp/cache/subrootS7COO
remote: Moving subdir: frontend to temp dir: /tmp/codon/tmp/cache/subrootS7COO
remote: Cleaning and re-creating build directory
remote: rm: cannot remove '/app': Read-only file system
remote: Moving project directory from /tmp/codon/tmp/cache/subrootS7COO to /app
remote: mv: inter-device move failed: '/tmp/codon/tmp/cache/subrootS7COO/frontend' to '/app'; unable to remove target: Read-only file system
remote: -----> Discovering process types
remote: Procfile declares types -> (none)
remote:
remote: -----> Compressing...
remote: Done: 190B
remote: -----> Launching...
remote: Released v4
Due to these lines:
heroku-buildpack-subdir-to-root/bin/compile
Lines 47 to 51 in 3c759ab
In order to resolve this, the buildpack needs to instead delete only the contents of the directory (and not the directory root), and adjust the mv
of files back into the build directory accordingly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.