forked from pantsbuild/example-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpants_from_sources
More file actions
executable file
·23 lines (16 loc) · 819 Bytes
/
pants_from_sources
File metadata and controls
executable file
·23 lines (16 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash
# Copyright 2020 Pants project contributors.
# Licensed under the Apache License, Version 2.0 (see LICENSE).
# Runs pants from sources. Useful for debugging.
# Assumes you have the pantsbuild/pants repo checked out in a sibling dir of this dir,
# named 'pants' but overridable using PANTS_SOURCE.
set -euo pipefail
cd "$(git rev-parse --show-toplevel)"
PANTS_SOURCE="${PANTS_SOURCE:-../pants}"
# When running pants from sources you are likely to be modifying those sources, so
# you won't want pantsd running. You can override this by setting ENABLE_PANTSD=true.
ENABLE_PANTSD="${ENABLE_PANTSD:-false}"
export PANTS_VERSION="$(cat "${PANTS_SOURCE}/src/python/pants/VERSION")"
export PANTS_PANTSD="${ENABLE_PANTSD}"
export no_proxy="*"
exec "${PANTS_SOURCE}/pants" "--no-verify-config" "$@"