Dockerfile use installer inject version tag #42
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request eliminates the issue where a package may be built with an older installer if someone forgot to modify the version tag in the Dockerfile before tagging the version and pushing it. We had an issue where the 1.3.0 package was built from the 1.2.0 installer because the Dockerfile.use-installer file had a default version of 1.2.0.
Rather than changing the Dockerfile.use-installer file to the currently published version every time a new tagged version is released, set the default to a non-existent installer (v0.0.0) and inject the version automatically through the --build-arg TAG by getting it from the tagged version that is being pushed. This has been tested in the Thirsty2/quicklogic-fpga-toolchain repo, and works well as long as the tagged versions pushed to github are of the form vX.Y.Z where X, Y, and Z are integers, and v is the character 'v'. The installer has to exist and be downloadable through wget at a path produced automatically from this version. The v1.2.0 and v1.3.0 installers do exist in locations that adhere to the assumptions in this pull request.