summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorruki <[email protected]>2019-08-24 00:46:27 +0800
committerruki <[email protected]>2019-08-23 22:38:46 +0800
commitec3a93401eee240cc82e17c575c295ed9a7a9ec3 (patch)
tree13eebc7267c75787c6098afae5d72eeea14b19c5 /scripts
parent09d493cd32648a61cf8999386ffd767df53912ee (diff)
update script
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/archive-all.sh31
-rwxr-xr-xscripts/makeself/build-runfile.sh38
2 files changed, 36 insertions, 33 deletions
diff --git a/scripts/archive-all.sh b/scripts/archive-all.sh
index ace51da9f..eddbcee96 100755
--- a/scripts/archive-all.sh
+++ b/scripts/archive-all.sh
@@ -1,10 +1,8 @@
#!/usr/bin/env bash
-# ./scripts/archive-all.sh v2.2.7
-tag=$1
+# ./scripts/archive-all.sh
tmpdir=/tmp/.xmake_archive
xmakeroot=`pwd`
-outputfile=$xmakeroot/xmake-$tag
if [ -d $tmpdir ]; then
rm -rf $tmpdir
fi
@@ -13,20 +11,27 @@ mkdir $tmpdir
# copy xmake repo to temproot/xmake-repo, remove git ignored files
cp -r $xmakeroot $tmpdir/repo
cd $tmpdir/repo
-git clean -dfX
-git submodule foreach git clean -dfX
+git reset --hard HEAD
+git clean -fd
+git submodule foreach git clean -fd
-# clean some unused files
-xmake l private.utils.bcsave -s -o $tmpdir/output $tmpdir/repo/xmake
-rm -rf $tmpdir/repo/xmake
-mv $tmpdir/output $tmpdir/repo/xmake
-cd $tmpdir/repo
+# prepare files
+version=`cat core/xmake.lua | grep -E "^set_version" | grep -oE "[0-9]*\.[0-9]*\.[0-9]*"`
+outputfile=$xmakeroot/xmake-v$version
+xmake l -v private.utils.bcsave -s -o $tmpdir/repo/output $tmpdir/repo/xmake
+rm -rf xmake
+mv output xmake
rm -rf tests
rm -rf core/src/tbox/tbox/src/demo
+cd core/src/tbox/tbox
+git add .
+git commit -a -m "..."
+cd -
git add .
git commit -a -m "..."
-git tag "$tag-1"
-git archive --format "zip" -9 -o "$outputfile.zip" "$tag-1"
-git archive --format "tar.gz" -9 -o "$outputfile.tar.gz" "$tag-1"
+git tag "v$version-1"
+ls -l
+git archive --format "zip" -9 -o "$outputfile.zip" "v$version-1"
+git archive --format "tar.gz" -9 -o "$outputfile.tar.gz" "v$version-1"
shasum -a 256 "$outputfile.zip"
shasum -a 256 "$outputfile.tar.gz"
diff --git a/scripts/makeself/build-runfile.sh b/scripts/makeself/build-runfile.sh
index 1b7d0412d..6662eded3 100755
--- a/scripts/makeself/build-runfile.sh
+++ b/scripts/makeself/build-runfile.sh
@@ -4,42 +4,40 @@
cd "$(dirname "$0")/../.."
xmakeroot=`pwd`
buildroot=$xmakeroot/scripts/makeself
-temproot=/tmp/xmake-makeself
-
-# clean up temproot
-if [ -d $temproot ]; then
- rm -rf $temproot
+tmpdir=/tmp/xmake-makeself
+if [ -d $tmpdir ]; then
+ rm -rf $tmpdir
fi
-mkdir -p $temproot
+mkdir -p $tmpdir
-# copy xmake repo to temproot/xmake-repo, remove git ignored files
-cp -r $xmakeroot $temproot/xmake-repo
-cd $temproot/xmake-repo
+# copy xmake repo to tmpdir/xmake-repo, remove git ignored files
+cp -r $xmakeroot $tmpdir/xmake-repo
+cd $tmpdir/xmake-repo
git clean -dfX
git submodule foreach git clean -dfX
-# copy files to temproot/xmake
-mkdir -p $temproot/xmake/scripts
-cd $temproot/xmake-repo
-cp -r ./core $temproot/xmake
-cp -r ./xmake $temproot/xmake
-cp ./scripts/get.sh $temproot/xmake/scripts
-cp ./*.md $temproot/xmake
-cp makefile $temproot/xmake
-cd $temproot/xmake
+# copy files to tmpdir/xmake
+mkdir -p $tmpdir/xmake/scripts
+cd $tmpdir/xmake-repo
+cp -r ./core $tmpdir/xmake
+cp -r ./xmake $tmpdir/xmake
+cp ./scripts/get.sh $tmpdir/xmake/scripts
+cp ./*.md $tmpdir/xmake
+cp makefile $tmpdir/xmake
+cd $tmpdir/xmake
rm -rf ./core/src/tbox/tbox/src/demo
rm -rf ./core/src/tbox/tbox/src/tbox/platform/windows
rm -rf ./core/src/pdcurses
# prepare info texts
-cd $temproot
+cd $tmpdir
cp $buildroot/* .
version=`cat ./xmake/core/xmake.lua | grep -E "^set_version" | grep -oE "[0-9]*\.[0-9]*\.[0-9]*"`
perl -pi -e "s/#xmake-version#/$version/g" ./header
perl -pi -e "s/#xmake-version#/$version/g" ./lsm
# make run file
-cd $temproot
+cd $tmpdir
wget https://github.com/megastep/makeself/releases/download/release-2.4.0/makeself-2.4.0.run -O ./makeself-2.4.0.run
sh ./makeself-2.4.0.run
./makeself-2.4.0/makeself.sh \