You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by so...@apache.org on 2017/04/28 06:08:47 UTC
svn commit: r19318 - /dev/incubator/weex/build_artifacts.sh
Author: sospartan
Date: Fri Apr 28 06:08:47 2017
New Revision: 19318
Log:
update build script
Modified:
dev/incubator/weex/build_artifacts.sh
Modified: dev/incubator/weex/build_artifacts.sh
==============================================================================
--- dev/incubator/weex/build_artifacts.sh (original)
+++ dev/incubator/weex/build_artifacts.sh Fri Apr 28 06:08:47 2017
@@ -1,14 +1,31 @@
#!/bin/bash -eu
function help {
echo 'HELP:'
- echo ' build_artifacts.sh {file} {gittag}'
+ echo ' build_artifacts.sh {file-name-without-tar-gz} {gittag}'
+ echo 'Example:build_artifacts.sh apache-weex-incubating-0.12.0-RC3-src 0.12.0-rc3'
}
if [ $# -lt 2 ]
then
help
exit 1
fi
-curl -o $1 "https://git-wip-us.apache.org/repos/asf?p=incubator-weex.git;a=snapshot;h=refs/tags/$2;sf=tgz"
-gpg --armor --output "$1.asc" --detach-sig $1
-gpg --print-md MD5 $1 > "$1.md5"
-gpg --print-md SHA1 $1 > "$1.sha"
\ No newline at end of file
+remote_file="https://git-wip-us.apache.org/repos/asf?p=incubator-weex.git;a=snapshot;h=refs/tags/$2;sf=tgz"
+local_file="$1-temp.tar.gz"
+tarfile="$1.tar.gz"
+echo "Download from $remote_file"
+echo "To $local_file"
+curl -o $local_file $remote_file
+
+mkdir -p build_temp
+tar -xvf $local_file -C build_temp
+mkdir "$1"
+mv build_temp/incubator-weex-* "$1/$1" #put in subfolder
+
+tar -zcvf $tarfile "$1"
+gpg --armor --output "$tarfile.asc" --detach-sig $tarfile
+gpg --print-md MD5 $tarfile > "$tarfile.md5"
+gpg --print-md SHA1 $tarfile > "$tarfile.sha"
+
+rm $local_file
+rm -r build_temp
+rm -r "$1"
\ No newline at end of file