Skip to content

Commit

Permalink
removing python dependency in shell scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
shoeffner committed Aug 12, 2016
1 parent b16b8fb commit 9480427
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 20 deletions.
17 changes: 7 additions & 10 deletions bin/fpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,9 @@ usage () {
export JAVA_HOME=${JAVA_HOME:-/usr/local/java}
export PATH=$JAVA_HOME/bin:$PATH


fromPom() {
case $# in
2) mvn -f modules/$1/pom.xml help:evaluate -Dexpression=$2 | sed -n -e '/^\[.*\]/ !{ p; }';;
3) mvn -f modules/$1/pom.xml help:evaluate -Dexpression=$2 | sed -n -e '/^\[.*\]/ !{ p; }' | \
python -c "import xml.etree.ElementTree as ET; import sys; field = ET.parse(sys.stdin).getroot().find(\"$3\"); print (field.text if field != None else '')"
esac
mvn -f modules/$1/pom.xml help:evaluate -Dexpression=$2 | sed -n -e '/^\[.*\]/ !{ p; }'
}

exitOnError() {
Expand Down Expand Up @@ -70,14 +67,14 @@ done
for module in "$modules"; do
name=`fromPom $module/. project.name`
version=`fromPom $module/. project.version`
email=`fromPom $module/. project.properties application.email`
email=`fromPom $module/. application.email`
group=`fromPom $module/. project.groupId`
id=$name-$version-$profile
home=${home:-/usr/local/$id}
log=${log:-/var/log/$id}
deps=`fromPom $module/. project.properties application.dependencies`
daemon=`fromPom $module/. project.properties application.daemon.enable`
daemon_deps=`fromPom $module/. project.properties application.daemon.dependencies`
deps=`fromPom $module/. application.dependencies`
daemon=`fromPom $module/. application.daemon.enable`
daemon_deps=`fromPom $module/. application.daemon.dependencies`

echo "packaging service: $id"

Expand Down Expand Up @@ -146,4 +143,4 @@ for module in "$modules"; do
eval fpm $fpm || exitOnError "failed to build rpm: $module"
fi
done
done
done
11 changes: 3 additions & 8 deletions bin/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,12 @@ EOF
exit ${2:-0}
}

# FIXME: brew install python
fromPom() {
case $# in
2) mvn -f $1/pom.xml help:evaluate -Dexpression=$2 | sed -n -e '/^\[.*\]/ !{ p; }';;
3) mvn -f $1/pom.xml help:evaluate -Dexpression=$2 | sed -n -e '/^\[.*\]/ !{ p; }' | \
python -c "import xml.etree.ElementTree as ET; import sys; field = ET.parse(sys.stdin).getroot().find(\"$3\"); print (field.text if field != None else '')"
esac
mvn -f $1/pom.xml help:evaluate -Dexpression=$2 | sed -n -e '/^\[.*\]/ !{ p; }'
}

start() {
version=$(fromPom . project.properties application.version).`date -u "+%Y%m%d%H%M%S"`
version=$(fromPom . application.version).`date -u "+%Y%m%d%H%M%S"`

echo "milestone version: $version"

Expand Down Expand Up @@ -87,4 +82,4 @@ for command in ${@:$OPTIND}; do
"") usage "unknown command: ${command}" 1;;
*) usage "unknown command: ${command}" 1;;
esac
done
done
4 changes: 2 additions & 2 deletions bin/wasabi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.
###############################################################################

formulas=("bash" "cask" "git" "maven" "wget" "python" "ruby" "node")
formulas=("bash" "cask" "git" "maven" "wget" "ruby" "node")
casks=("java" "docker")
endpoint_default=localhost:8080
verify_default=false
Expand Down Expand Up @@ -294,4 +294,4 @@ for command in ${@:$OPTIND}; do
"") usage "unknown command: ${command}" 1;;
*) usage "unknown command: ${command}" 1;;
esac
done
done

0 comments on commit 9480427

Please sign in to comment.