You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by le...@apache.org on 2019/07/19 00:04:20 UTC
[incubator-datasketches-memory] branch master updated: updaate
scripts
This is an automated email from the ASF dual-hosted git repository.
leerho pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-datasketches-memory.git
The following commit(s) were added to refs/heads/master by this push:
new b0ca4bb updaate scripts
b0ca4bb is described below
commit b0ca4bbf963c27df6e35ff8a48ee2d1b408516bb
Author: Lee Rhodes <le...@users.noreply.github.com>
AuthorDate: Thu Jul 18 17:04:11 2019 -0700
updaate scripts
---
scripts/DistDeploymentStructure.txt | 35 +++++++++++
scripts/bashDeployToDist.sh | 113 ++++++++++++++----------------------
2 files changed, 78 insertions(+), 70 deletions(-)
diff --git a/scripts/DistDeploymentStructure.txt b/scripts/DistDeploymentStructure.txt
new file mode 100644
index 0000000..0046412
--- /dev/null
+++ b/scripts/DistDeploymentStructure.txt
@@ -0,0 +1,35 @@
+===========The Dist Deployment Structure==========="
+The DataSketche base directories in https://dist.apache.org/repos/dist/ are:"
+ - dev/incubator/datasketches/"
+ - release/incubator/datasketches/"
+
+ Each of these two directories contain a KEYS file, which is where you must have your GPG public key stored."
+
+After graduation the base directories will be the same but without the incubator level."
+
+For both the dev and the release branches, the root contains sub-directories for each of "
+the datasketches-X repositories as follows:"
+ - characterization/"
+ - core/"
+ - cpp/"
+ - hive/"
+ - memory/"
+ - pig/"
+ - postgresql/"
+ - vector/"
+
+Below these sub=directories is a level of leaf directories that define a particular release or release candidate."
+
+Finally the leaf directories contain the zip and signature files for a release or release candidate."
+The full tree will look something like this example:"
+ dist/"
+ dev/"
+ incubator/"
+ datasketches/"
+ KEYS"
+ memory/"
+ 0.12.3-incubating-RC1/"
+ apache-datasketches-memory-0.12.3-incubating-src.zip"
+ apache-datasketches-memory-0.12.3-incubating-src.zip.asc"
+ apache-datasketches-memory-0.12.3-incubating-src.zip.sha512"
+ etc."
diff --git a/scripts/bashDeployToDist.sh b/scripts/bashDeployToDist.sh
index 7afcbdb..4cf88ea 100755
--- a/scripts/bashDeployToDist.sh
+++ b/scripts/bashDeployToDist.sh
@@ -17,53 +17,17 @@
# specific language governing permissions and limitations
# under the License.
-# This assumes it is being executed from the project root directory.
-# From the project directory run: scripts/assembleSignVerify.sh
+# This script assumes it is being run from the project root directory.
+# From the project directory run: scripts/<this script>.sh
# This is generic in that it does not assume a POM file and does not use Maven.
+# It does us Git.
+# Input Parameters:
+# \$1 = project.artifactId
+# \$2 = GitHub Tag
+# For example: $ scripts/<this script>.sh datasketches-memory 0.12.3-incubator
echo
-echo "================Bash Deploy to Dist================"
-echo " This script must be run from the base directory of the project."
-echo " This script obtains the 'project.artifactId' and the 'project.version' from the \$1 and \$2 input parameters "
-echo " For example: $ scripts/bashDeployToDist.sh datasketches-memory 0.12.3-incubator"
-echo
-echo "===========The Dist Deployment Structure==========="
-echo "The DataSketche base directories in https://dist.apache.org/repos/dist/ are:"
-echo " - dev/incubator/datasketches/"
-echo " - release/incubator/datasketches/"
-echo
-echo " Each of these two directories contain a KEYS file, which is where you must have your GPG public key stored."
-echo
-echo "After graduation the base directories will be the same but without the incubator level."
-echo
-echo "For both the dev and the release branches, the root contains sub-directories for each of "
-echo "the datasketches-X repositories as follows:"
-echo " - characterization/"
-echo " - core/"
-echo " - cpp/"
-echo " - hive/"
-echo " - memory/"
-echo " - pig/"
-echo " - postgresql/"
-echo " - vector/"
-echo
-echo "Below these sub=directories is a level of leaf directories that define a particular release or release candidate."
-echo
-echo "Finally the leaf directories contain the zip and signature files for a release or release candidate."
-echo "The full tree will look something like this example:"
-echo " dist/"
-echo " dev/"
-echo " incubator/"
-echo " datasketches/"
-echo " KEYS"
-echo " memory/"
-echo " 0.12.3-incubating-RC1/"
-echo " apache-datasketches-memory-0.12.3-incubating-src.zip"
-echo " apache-datasketches-memory-0.12.3-incubating-src.zip.asc"
-echo " apache-datasketches-memory-0.12.3-incubating-src.zip.sha512"
-echo " etc."
-echo
echo "===================Check List======================"
echo "1. Verify that you can successfully read and write to the dist directories using SVN."
echo
@@ -71,20 +35,26 @@ echo "2. Verify that your GPG keys have been created and stored in:"
echo " - https://dist.apache.org/repos/dist/dev/incubator/datasketches/KEYS AND"
echo " - https://dist.apache.org/repos/dist/release/incubator/datasketches/KEYS"
echo
-echo "3. Verify the POM project.version format is one of:"
-echo " X.Y.Z"
-echo " X.Y.Z-SNAPSHOT"
-echo " X.Y.Z-incubator"
-echo " X.Y.Z-incubator-SNAPSHOT"
+echo "3. Run all Unit Tests, Strict Profiles, CheckStyle, SpotBugs, Clover, etc."
+echo
+echo "4. Locally create a release branch with a name of one of the following forms:"
+echo " 1.0.X"
+echo " 1.0.X-incubating"
+echo
+echo "5. Locally create a tag with a name of one of the following forms:"
+echo " 1.0.0"
+echo " 1.0.0-SNAPSHOT"
+echo " 1.0.0-incubator"
+echo " 1.0.0-incubator-SNAPSHOT"
echo
echo " 'SNAPSHOT', if relevant, is always at the end of the version string and capitalized."
-echo " Note: SNAPSHOT deployments are never relevant for the 'release' branch."
+echo " Note: SNAPSHOT deployments are never relevant for the 'dist/release' branch."
echo
-echo "4. Verify that your local GitHub repository current and the git status is clean."
+echo " Commit the branch and tag back to the remote origin"
echo
-echo "5. Locally checkout the branch or tag that you want to deploy."
+echo "6. Verify that your local GitHub repository current and the git status is clean."
echo
-echo "Proceed? [y|N]"; read confirm; if [[ $confirm != "y" ]]; then echo "Please rerun this script when ready."; exit; fi
+echo "Proceed? [y|N]"; read confirm; if [[ $confirm != "y" ]]; then echo "Please rerun this script when ready."; exit 1; fi
TMP=$(git status --porcelain)
if [[ -n $TMP ]];
@@ -108,7 +78,7 @@ eval $(gpg-agent --daemon) > /dev/null
## Extract project.artifactId and project.version from input parameters:
ProjectArtifactId=$1
-ProjectVersion=$2
+Tag=$2
# Determine the type of release / deployment we are dealing with
# and adjust the target directories and file version to be used in the file name accordingly.
@@ -121,7 +91,7 @@ ReleaseType=
FileVersion=
LeafDir=
-if [[ $ProjectVersion =~ .*-SNAPSHOT ]];
+if [[ $Tag =~ .*-SNAPSHOT ]];
then
echo
echo "This version is a SNAPSHOT. Do you still want to deploy?"
@@ -130,12 +100,12 @@ then
then
echo "Please correct the version string and rerun this script"
echo
- exit
+ exit 1
fi
Snapshot=true
ReleaseType="SNAPSHOT"
- FileVersion=${ProjectVersion%-SNAPSHOT}-$TIME # Remove SNAPSHOT, add date-time
- LeafDir=$ProjectVersion
+ FileVersion=${Tag%-SNAPSHOT}-$TIME # Remove SNAPSHOT, add date-time
+ LeafDir=$Tag
#continue
else # NOT a SNAPSHOT
Snapshot=false
@@ -145,20 +115,20 @@ else # NOT a SNAPSHOT
if [[ $confirm != "y" ]];
then # NOT ReleaseCandidate, could be Final Release
ReleaseCandidate=false
- echo "Please confirm that this the Final Release of $ProjectArtifactId : $ProjectVersion ? [y|N]"
+ echo "Please confirm that this the Final Release of $ProjectArtifactId : $Tag ? [y|N]"
read confirm
if [[ $confirm != "y" ]];
then # NOT Final Release either, bail out
Release=false
echo "Please correct the input and rerun this script"
echo
- exit
+ exit 1
else # Final Release
Release=true
ReleaseType="Release"
- FileVersion="$ProjectVersion"
- LeafDir=$ProjectVersion
+ FileVersion="$Tag"
+ LeafDir=$Tag
#continue
fi
else # ReleaseCandidate
@@ -166,8 +136,8 @@ else # NOT a SNAPSHOT
echo "What is the Release Candidate Number? NNN"
read RCNUM
ReleaseType="Release Candidate: RC$RCNUM"
- FileVersion="$ProjectVersion"
- LeafDir="$ProjectVersion-RC$RCNUM"
+ FileVersion="$Tag"
+ LeafDir="$Tag-RC$RCNUM"
#continue
fi
fi
@@ -178,7 +148,7 @@ fi
SubDir=$(expr "$ProjectArtifactId" : 'datasketches-\([a-z]*\)')
# Are we still incubating?
-if [[ $ProjectVersion =~ .*-incubating.* ]]
+if [[ $Tag =~ .*-incubating.* ]]
then
Incubating=true
Incubator="incubator/"
@@ -215,7 +185,7 @@ ZipName=apache-${ProjectArtifactId}-${FileVersion}-src.zip
echo
echo "===========SUMMARY OF INPUT PARAMETERS============="
echo "ProjectArtifactId : $ProjectArtifactId"
-echo "Project Version : $ProjectVersion"
+echo "Project Version : $Tag"
echo "Release Type : $ReleaseType"
echo "Incubating : $Incubating"
echo "File Version String : $FileVersion"
@@ -226,6 +196,7 @@ echo "FilesPath : $FilesPath"
echo "LocalSvnBasePath : $LocalSvnBasePath"
echo "RemoteSvnBasePath : $RemoteSvnBasePath"
echo "LocalFilesPath : $LocalFilesPath"
+
echo
echo "Please confirm if the above is correct: [y|N]"
read confirm
@@ -233,7 +204,7 @@ if [[ $confirm != "y" ]];
then
echo "Please correct the input and rerun this script"
echo
- exit
+ exit 1
fi
# move to base path and checkout
@@ -259,7 +230,7 @@ then
echo
echo "Please correct the input and rerun this script"
echo
- exit
+ exit 1
fi
#make the leaf directories
@@ -268,7 +239,9 @@ mkdir -p $LocalFilesPath
echo
echo "## Zip:"
-scripts/createZip.sh $ZipName $LocalFilesPath
+# ZIP
+#scripts/createZip.sh $ZipName $LocalFilesPath
+git archive --output="$LocalFilesPath"/$ZipName $Tag
echo
echo "Is the Zip file correct? [y|N]"
@@ -277,7 +250,7 @@ if [[ $confirm != "y" ]];
then
echo "Please correct the input and rerun this script"
echo
- exit
+ exit 1
fi
cd $LocalFilesPath #for signing
@@ -351,7 +324,7 @@ then
echo "Please correct the input and rerun this script"
echo "You may have to manually remove some contents from Dist"
echo
- exit
+ exit 1
fi
echo
echo "# SUCCESS"
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org