forked from ocaml/opam
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add implicit env variables when building packages.
Now, OPAM_PACKAGE_NAME and OPAM_PACKAGE_VERSION are available.
- Loading branch information
Showing
2 changed files
with
12 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
#!/bin/bash -eu | ||
|
||
echo "Building P3" | ||
ocamlbuild p3.cma p3.cmxa p3_bar.cma p3_bar.cmxa | ||
echo "Building P3 version ${OPAM_PACKAGE_VERSION}" | ||
|
||
if [ x${OPAM_PACKAGE_NAME} == xP3 ]; then | ||
ocamlbuild p3.cma p3.cmxa p3_bar.cma p3_bar.cmxa | ||
else | ||
exit 1 | ||
fi |