Tarball build script done.

This commit is contained in:
Martin Dvorak 2018-07-31 23:52:52 +02:00
parent 06d1523a86
commit 14d2e8ddc1
39 changed files with 26 additions and 35 deletions

View file

@ -24,7 +24,8 @@ function tarballClean() {
if [ "${1}" = "--purge" ]
then
# development files
rm -vrf .git .gitignore .settings Debug Release .cproject .project hstr.pro
rm -vrf build .git .gitignore .settings Debug Release .cproject .project hstr.pro
rm -vf .travis.yml pad.xml _config.yml
fi
# garbage
find . -name "*.*~" | xargs rm -vf {}

View file

@ -13,8 +13,11 @@
# 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.
# Script used to build HSTR using autotools.
#
# HSTR release method:
#
# Method:
# 1. Tarball release checklist:
# - git grep <previous version>
# - update version in the source code (hstr.c)
@ -22,26 +25,36 @@
# - update version github-env.sh
# - ... search for old version using Eclipse/grep
#
# 2. Run this script from this directory.
#
# 2. Run this script from Git repository - it will copy repository content
# to a release directory
. ./tarball-env.sh
export SCRIPT_HOME=`pwd`
export HH_VERSION="1.27.0"
export NOW=`date +%Y-%m-%d--%H-%M-%S`
export GH_RELEASE_DIR=~/p/hstr/release
export GH_DISTRO_DIR=${GH_RELEASE_DIR}/release-${NOW}
function makeTarballRelease() {
cp -vrf ${SCRIPT_HOME}/../../hstr .
cd hstr && rm -vrf debian doc tests && cd dist && ./1-dist.sh
if [ $? -ne 0 ]
cp -vrf ${SCRIPT_HOME}/../../../hstr .
cd hstr && rm -vrf debian doc test && cd build/tarball && ./tarball-automake.sh --purge
if [ ${?} -ne 0 ]
then
exit 1;
echo "ERROR: automake prepare phase failed"
exit 1;
fi
cd ../..
tar zcfv hh-${HHVERSION}-src.tgz hstr
cd ../../..
tar zcfv hh-${HH_VERSION}-tarball.tgz hstr
cd hstr && ./configure && make && cp src/hh ..
cd ..
tar zcfv hh-${HHVERSION}-bin-64b.tgz hh
strip -v hh
tar zcfv hh-${HH_VERSION}-bin-64b.tgz hh
}
# ############################################################################
# # Main #
# ############################################################################
mkdir -v ${GH_DISTRO_DIR}
cd ${GH_DISTRO_DIR} && makeTarballRelease

View file

@ -1,23 +0,0 @@
#!/bin/bash
#
# Copyright (C) 2014-2018 Martin Dvorak <martin.dvorak@mindforger.com>
#
# Licensed 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.
export HH_VERSION="1.27.0"
export NOW=`date +%Y-%m-%d--%H-%M-%S`
export GH_DISTRO_DIR=${GH_RELEASE_DIR}/release-${NOW}
export GH_RELEASE_DIR=~/p/hstr/release
# eof