You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2021/03/03 07:02:12 UTC

[GitHub] [incubator-mxnet] sandeep-krishnamurthy commented on a change in pull request #19972: [WIP] [v1.x] Create tool for building source archives

sandeep-krishnamurthy commented on a change in pull request #19972:
URL: https://github.com/apache/incubator-mxnet/pull/19972#discussion_r586163489



##########
File path: tools/create_source_archive.sh
##########
@@ -0,0 +1,82 @@
+#!/bin/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.
+
+set -e
+
+MXNET_BRANCH=$1
+MXNET_TAG=$2
+CMD=$(basename $0)
+
+if [[ -z "$MXNET_BRANCH" || -z "$MXNET_TAG" ]]; then
+    echo "Usage: $CMD <branch> <tag>"
+    echo "  where <branch> is the branch the tag was cut from."
+    echo "        <tag> is the tag you want to build a release for."
+    echo ""
+    echo "  example: $CMD v1.8.x 1.8.0.rc3"
+    exit -1
+fi
+
+TAR=tar
+if [[ $(uname) == "Darwin" ]]; then
+    TAR=gtar
+fi
+
+# make sure gnu tar is installed
+which $TAR > /dev/null
+if [[ $? -ne 0 ]]; then
+    echo "It looks like you don't have GNU tar installed."
+    echo ""
+    echo "For OSX users, please install gnu-tar using the command 'brew install gnu-tar'"
+    exit -1
+fi
+
+SRCDIR=apache-mxnet-src-$MXNET_TAG-incubating
+TARBALL=$SRCDIR.tar.gz
+
+# clone the repo and checkout the tag
+echo "Cloning the MXNet repository..."
+git clone -b $MXNET_BRANCH https://github.com/apache/incubator-mxnet.git $SRCDIR
+pushd $SRCDIR
+git submodule update --init --recursive
+echo "Checking out tag $MXNET_TAG..."
+git checkout $MXNET_TAG
+
+echo "Removing unwanted artifacts..."
+#### IMPORTANT ####
+# Remove artifacts which do not comply with the Apache Licensing Policy
+rm -rf R-package

Review comment:
       Can you make this part of another file say another text file. so it is easy to audit for someone during voting without looking at a code file.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org