swamirishi commented on code in PR #4596: URL: https://github.com/apache/ozone/pull/4596#discussion_r1173958513
########## hadoop-ozone/dev-support/checks/native_check.sh: ########## @@ -0,0 +1,49 @@ +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +function get_rocks_native_git_sha() { + echo "Getting Rocks Native Git sha" + echo + echo "git log -n 1 --format=\"%h\" ./hadoop-hdds/rocks-native" + ROCKS_NATIVE_GIT_SHA=$(git log -n 1 --format="%h" ./hadoop-hdds/rocks-native) + echo "ROCKS_NATIVE_GIT_SHA = ${ROCKS_NATIVE_GIT_SHA}" + readonly ROCKS_NATIVE_GIT_SHA +} + +function init_native_maven_opts() { + if [[ "${FORCE_NATIVE_BUILD}" == "true" ]]; then + NATIVE_MAVEN_OPTIONS="-Drocks_tools_native" + else + get_rocks_native_git_sha + PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) + VERSION_NUMBER=$(echo "${PROJECT_VERSION}"| cut -f1 -d'-') Review Comment: done ########## hadoop-ozone/dev-support/checks/native_check.sh: ########## @@ -0,0 +1,49 @@ +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +function get_rocks_native_git_sha() { + echo "Getting Rocks Native Git sha" + echo + echo "git log -n 1 --format=\"%h\" ./hadoop-hdds/rocks-native" + ROCKS_NATIVE_GIT_SHA=$(git log -n 1 --format="%h" ./hadoop-hdds/rocks-native) + echo "ROCKS_NATIVE_GIT_SHA = ${ROCKS_NATIVE_GIT_SHA}" + readonly ROCKS_NATIVE_GIT_SHA +} + +function init_native_maven_opts() { + if [[ "${FORCE_NATIVE_BUILD}" == "true" ]]; then + NATIVE_MAVEN_OPTIONS="-Drocks_tools_native" + else + get_rocks_native_git_sha + PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) + VERSION_NUMBER=$(echo "${PROJECT_VERSION}"| cut -f1 -d'-') + EXPECTED_ROCKS_NATIVE_VERSION=${VERSION_NUMBER}".${ROCKS_NATIVE_GIT_SHA}"${PROJECT_VERSION:${#VERSION_NUMBER}} Review Comment: done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
