mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-25 07:07:42 -05:00
Add support for version_tag
Add support for adding a version tag to the generated wheels
This commit is contained in:
1 parent
158ddddca0
commit
be8039a0a8
1 file changed
+13
@@ -67,6 +67,7 @@ OPTIONS:
|
||||
--version-simulators <ref> Git ref for opm-simulators (branch/tag/PR) (default: master)
|
||||
--target-common <targets> CMake targets for opm-common (default: opmcommon_python)
|
||||
--target-simulators <targets> CMake targets for opm-simulators (default: simulators)
|
||||
--version-tag <tag> Version tag for wheels (optional)
|
||||
--no-buildx Use DOCKER_BUILDKIT=0 for detailed output
|
||||
--help Show this help message
|
||||
|
||||
@@ -85,6 +86,8 @@ EXAMPLES:
|
||||
# Test multiple PRs together
|
||||
$(basename "$0") debug --libtype shared --no-buildx --jobs 8 --output /tmp/wheels
|
||||
# Creates /tmp/wheels/ with wheels (absolute path)
|
||||
$(basename "$0") release --version-tag "rc1" --output release-wheels
|
||||
# Creates docker/release-wheels/ with wheels tagged as version rc1
|
||||
|
||||
NOTES:
|
||||
- Script automatically runs from python/ directory
|
||||
@@ -147,6 +150,7 @@ parse_arguments() {
|
||||
VERSION_SIMULATORS="master"
|
||||
TARGET_COMMON="opmcommon_python"
|
||||
TARGET_SIMULATORS="simulators"
|
||||
VERSION_TAG=""
|
||||
NO_BUILDX=false
|
||||
|
||||
# Parse options
|
||||
@@ -196,6 +200,10 @@ parse_arguments() {
|
||||
TARGET_SIMULATORS="$2"
|
||||
shift 2
|
||||
;;
|
||||
--version-tag)
|
||||
VERSION_TAG="$2"
|
||||
shift 2
|
||||
;;
|
||||
--no-buildx)
|
||||
NO_BUILDX=true
|
||||
shift
|
||||
@@ -283,6 +291,11 @@ main() {
|
||||
DOCKER_CMD+=(--build-arg "version_simulators=$VERSION_SIMULATORS")
|
||||
DOCKER_CMD+=(--build-arg "target_common=$TARGET_COMMON")
|
||||
DOCKER_CMD+=(--build-arg "target_simulators=$TARGET_SIMULATORS")
|
||||
|
||||
# Add version_tag if specified
|
||||
if [ -n "$VERSION_TAG" ]; then
|
||||
DOCKER_CMD+=(--build-arg "version_tag=$VERSION_TAG")
|
||||
fi
|
||||
|
||||
# Add output option if specified
|
||||
if [ -n "$OUTPUT_DIR" ]; then
|
||||
|
||||
Reference in new issue
Block a user