You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Arnaud Nauwynck (Jira)" <ji...@apache.org> on 2024/12/19 19:15:00 UTC
[jira] [Created] (SPARK-50625) simplify shell scripts using mvn help:evaluate
Arnaud Nauwynck created SPARK-50625:
---------------------------------------
Summary: simplify shell scripts using mvn help:evaluate
Key: SPARK-50625
URL: https://issues.apache.org/jira/browse/SPARK-50625
Project: Spark
Issue Type: Improvement
Components: Build
Affects Versions: 3.5.3
Reporter: Arnaud Nauwynck
mvn script could be cleaned a little, for example in script ./dev/make-distribution.sh, to use "-q -DforceStdout=true" instead of "mvn ... | grep -v INFO | grep -v WARNING"
a typical example
{noformat}
$ mvn help:evaluate -Dexpression=project.version -q -DforceStdout=true
4.0.0-SNAPSHOT
{noformat}
So using
{noformat}
VERSION=$("$MVN" help:evaluate -Dexpression=project.version -q -DforceStdout=true)
{noformat}
instead of
{noformat}
VERSION=$("$MVN" help:evaluate -Dexpression=project.version $@ \
| grep -v "INFO"\
| grep -v "WARNING"\
| tail -n 1)
{noformat}
This pattern occurs 6 times in scripts
{noformat}
$ grep -R -- "grep -v \"INFO\""
dev/make-distribution.sh: | grep -v "INFO"\
dev/make-distribution.sh: | grep -v "INFO"\
dev/make-distribution.sh: | grep -v "INFO"\
dev/make-distribution.sh: | grep -v "INFO"\
resource-managers/kubernetes/integration-tests/dev/dev-run-integration-tests.sh: | grep -v "INFO"\
resource-managers/kubernetes/integration-tests/scripts/setup-integration-test-env.sh: | grep -v "INFO"\
{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org