From 14d2e8ddc13f521e4fe9446036cd916b9d0b0719 Mon Sep 17 00:00:00 2001 From: Martin Dvorak Date: Tue, 31 Jul 2018 23:52:52 +0200 Subject: [PATCH] Tarball build script done. --- build/tarball/tarball-automake.sh | 3 +- build/tarball/tarball-build.sh | 35 +++++++++++++------ build/tarball/tarball-env.sh | 23 ------------ {tests => test}/bin/clean-tests.sh | 0 {tests => test}/bin/hh-env-monster.sh | 0 {tests => test}/bin/hh-env-utf8.sh | 0 ....bash_history_123_DEL_WITH_FINISHING_SPACE | 0 {tests => test}/resources/.bash_history_131_A | 0 {tests => test}/resources/.bash_history_131_B | 0 .../resources/.bash_history_66_GERMAN | 0 .../resources/.bash_history_BUG_124 | 0 .../resources/.bash_history_BUG_176 | 0 {tests => test}/resources/.bash_history_CZ | 0 ....bash_history_DELETE_ALL_AND_CRASH_BUG_129 | 0 .../.bash_history_ROTATE_VIEW_CRASH_131 | 0 {tests => test}/resources/.hh_favorites | 0 {tests => test}/src/test_args.c | 0 {tests => test}/src/test_curses_keyb.c | 0 {tests => test}/src/test_escape_chars.c | 0 {tests => test}/src/test_favorites.c | 0 {tests => test}/src/test_getopt.c | 0 {tests => test}/src/test_hashset.c | 0 {tests => test}/src/test_keyb.c | 0 {tests => test}/src/test_ranking.c | 0 {tests => test}/src/test_regexp.c | 0 {tests => test}/src/test_utf8.c | 0 {tests => test}/test_args.sh | 0 {tests => test}/test_bug124.sh | 0 {tests => test}/test_bug163.sh | 0 {tests => test}/test_bug175.sh | 0 {tests => test}/test_bug176.sh | 0 {tests => test}/test_curses.sh | 0 {tests => test}/test_favorites.sh | 0 {tests => test}/test_getopt.sh | 0 {tests => test}/test_hashset.sh | 0 {tests => test}/test_keyb.sh | 0 {tests => test}/test_ranking.sh | 0 {tests => test}/test_regexp.sh | 0 {tests => test}/test_utf8.sh | 0 39 files changed, 26 insertions(+), 35 deletions(-) delete mode 100755 build/tarball/tarball-env.sh rename {tests => test}/bin/clean-tests.sh (100%) rename {tests => test}/bin/hh-env-monster.sh (100%) rename {tests => test}/bin/hh-env-utf8.sh (100%) rename {tests => test}/resources/.bash_history_123_DEL_WITH_FINISHING_SPACE (100%) rename {tests => test}/resources/.bash_history_131_A (100%) rename {tests => test}/resources/.bash_history_131_B (100%) rename {tests => test}/resources/.bash_history_66_GERMAN (100%) rename {tests => test}/resources/.bash_history_BUG_124 (100%) rename {tests => test}/resources/.bash_history_BUG_176 (100%) rename {tests => test}/resources/.bash_history_CZ (100%) rename {tests => test}/resources/.bash_history_DELETE_ALL_AND_CRASH_BUG_129 (100%) rename {tests => test}/resources/.bash_history_ROTATE_VIEW_CRASH_131 (100%) rename {tests => test}/resources/.hh_favorites (100%) rename {tests => test}/src/test_args.c (100%) rename {tests => test}/src/test_curses_keyb.c (100%) rename {tests => test}/src/test_escape_chars.c (100%) rename {tests => test}/src/test_favorites.c (100%) rename {tests => test}/src/test_getopt.c (100%) rename {tests => test}/src/test_hashset.c (100%) rename {tests => test}/src/test_keyb.c (100%) rename {tests => test}/src/test_ranking.c (100%) rename {tests => test}/src/test_regexp.c (100%) rename {tests => test}/src/test_utf8.c (100%) rename {tests => test}/test_args.sh (100%) rename {tests => test}/test_bug124.sh (100%) rename {tests => test}/test_bug163.sh (100%) rename {tests => test}/test_bug175.sh (100%) rename {tests => test}/test_bug176.sh (100%) rename {tests => test}/test_curses.sh (100%) rename {tests => test}/test_favorites.sh (100%) rename {tests => test}/test_getopt.sh (100%) rename {tests => test}/test_hashset.sh (100%) rename {tests => test}/test_keyb.sh (100%) rename {tests => test}/test_ranking.sh (100%) rename {tests => test}/test_regexp.sh (100%) rename {tests => test}/test_utf8.sh (100%) diff --git a/build/tarball/tarball-automake.sh b/build/tarball/tarball-automake.sh index 1a34600..2ef65c9 100755 --- a/build/tarball/tarball-automake.sh +++ b/build/tarball/tarball-automake.sh @@ -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 {} diff --git a/build/tarball/tarball-build.sh b/build/tarball/tarball-build.sh index 78f1513..bd04283 100755 --- a/build/tarball/tarball-build.sh +++ b/build/tarball/tarball-build.sh @@ -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 # - 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 diff --git a/build/tarball/tarball-env.sh b/build/tarball/tarball-env.sh deleted file mode 100755 index d6c3936..0000000 --- a/build/tarball/tarball-env.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2014-2018 Martin Dvorak -# -# 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 diff --git a/tests/bin/clean-tests.sh b/test/bin/clean-tests.sh similarity index 100% rename from tests/bin/clean-tests.sh rename to test/bin/clean-tests.sh diff --git a/tests/bin/hh-env-monster.sh b/test/bin/hh-env-monster.sh similarity index 100% rename from tests/bin/hh-env-monster.sh rename to test/bin/hh-env-monster.sh diff --git a/tests/bin/hh-env-utf8.sh b/test/bin/hh-env-utf8.sh similarity index 100% rename from tests/bin/hh-env-utf8.sh rename to test/bin/hh-env-utf8.sh diff --git a/tests/resources/.bash_history_123_DEL_WITH_FINISHING_SPACE b/test/resources/.bash_history_123_DEL_WITH_FINISHING_SPACE similarity index 100% rename from tests/resources/.bash_history_123_DEL_WITH_FINISHING_SPACE rename to test/resources/.bash_history_123_DEL_WITH_FINISHING_SPACE diff --git a/tests/resources/.bash_history_131_A b/test/resources/.bash_history_131_A similarity index 100% rename from tests/resources/.bash_history_131_A rename to test/resources/.bash_history_131_A diff --git a/tests/resources/.bash_history_131_B b/test/resources/.bash_history_131_B similarity index 100% rename from tests/resources/.bash_history_131_B rename to test/resources/.bash_history_131_B diff --git a/tests/resources/.bash_history_66_GERMAN b/test/resources/.bash_history_66_GERMAN similarity index 100% rename from tests/resources/.bash_history_66_GERMAN rename to test/resources/.bash_history_66_GERMAN diff --git a/tests/resources/.bash_history_BUG_124 b/test/resources/.bash_history_BUG_124 similarity index 100% rename from tests/resources/.bash_history_BUG_124 rename to test/resources/.bash_history_BUG_124 diff --git a/tests/resources/.bash_history_BUG_176 b/test/resources/.bash_history_BUG_176 similarity index 100% rename from tests/resources/.bash_history_BUG_176 rename to test/resources/.bash_history_BUG_176 diff --git a/tests/resources/.bash_history_CZ b/test/resources/.bash_history_CZ similarity index 100% rename from tests/resources/.bash_history_CZ rename to test/resources/.bash_history_CZ diff --git a/tests/resources/.bash_history_DELETE_ALL_AND_CRASH_BUG_129 b/test/resources/.bash_history_DELETE_ALL_AND_CRASH_BUG_129 similarity index 100% rename from tests/resources/.bash_history_DELETE_ALL_AND_CRASH_BUG_129 rename to test/resources/.bash_history_DELETE_ALL_AND_CRASH_BUG_129 diff --git a/tests/resources/.bash_history_ROTATE_VIEW_CRASH_131 b/test/resources/.bash_history_ROTATE_VIEW_CRASH_131 similarity index 100% rename from tests/resources/.bash_history_ROTATE_VIEW_CRASH_131 rename to test/resources/.bash_history_ROTATE_VIEW_CRASH_131 diff --git a/tests/resources/.hh_favorites b/test/resources/.hh_favorites similarity index 100% rename from tests/resources/.hh_favorites rename to test/resources/.hh_favorites diff --git a/tests/src/test_args.c b/test/src/test_args.c similarity index 100% rename from tests/src/test_args.c rename to test/src/test_args.c diff --git a/tests/src/test_curses_keyb.c b/test/src/test_curses_keyb.c similarity index 100% rename from tests/src/test_curses_keyb.c rename to test/src/test_curses_keyb.c diff --git a/tests/src/test_escape_chars.c b/test/src/test_escape_chars.c similarity index 100% rename from tests/src/test_escape_chars.c rename to test/src/test_escape_chars.c diff --git a/tests/src/test_favorites.c b/test/src/test_favorites.c similarity index 100% rename from tests/src/test_favorites.c rename to test/src/test_favorites.c diff --git a/tests/src/test_getopt.c b/test/src/test_getopt.c similarity index 100% rename from tests/src/test_getopt.c rename to test/src/test_getopt.c diff --git a/tests/src/test_hashset.c b/test/src/test_hashset.c similarity index 100% rename from tests/src/test_hashset.c rename to test/src/test_hashset.c diff --git a/tests/src/test_keyb.c b/test/src/test_keyb.c similarity index 100% rename from tests/src/test_keyb.c rename to test/src/test_keyb.c diff --git a/tests/src/test_ranking.c b/test/src/test_ranking.c similarity index 100% rename from tests/src/test_ranking.c rename to test/src/test_ranking.c diff --git a/tests/src/test_regexp.c b/test/src/test_regexp.c similarity index 100% rename from tests/src/test_regexp.c rename to test/src/test_regexp.c diff --git a/tests/src/test_utf8.c b/test/src/test_utf8.c similarity index 100% rename from tests/src/test_utf8.c rename to test/src/test_utf8.c diff --git a/tests/test_args.sh b/test/test_args.sh similarity index 100% rename from tests/test_args.sh rename to test/test_args.sh diff --git a/tests/test_bug124.sh b/test/test_bug124.sh similarity index 100% rename from tests/test_bug124.sh rename to test/test_bug124.sh diff --git a/tests/test_bug163.sh b/test/test_bug163.sh similarity index 100% rename from tests/test_bug163.sh rename to test/test_bug163.sh diff --git a/tests/test_bug175.sh b/test/test_bug175.sh similarity index 100% rename from tests/test_bug175.sh rename to test/test_bug175.sh diff --git a/tests/test_bug176.sh b/test/test_bug176.sh similarity index 100% rename from tests/test_bug176.sh rename to test/test_bug176.sh diff --git a/tests/test_curses.sh b/test/test_curses.sh similarity index 100% rename from tests/test_curses.sh rename to test/test_curses.sh diff --git a/tests/test_favorites.sh b/test/test_favorites.sh similarity index 100% rename from tests/test_favorites.sh rename to test/test_favorites.sh diff --git a/tests/test_getopt.sh b/test/test_getopt.sh similarity index 100% rename from tests/test_getopt.sh rename to test/test_getopt.sh diff --git a/tests/test_hashset.sh b/test/test_hashset.sh similarity index 100% rename from tests/test_hashset.sh rename to test/test_hashset.sh diff --git a/tests/test_keyb.sh b/test/test_keyb.sh similarity index 100% rename from tests/test_keyb.sh rename to test/test_keyb.sh diff --git a/tests/test_ranking.sh b/test/test_ranking.sh similarity index 100% rename from tests/test_ranking.sh rename to test/test_ranking.sh diff --git a/tests/test_regexp.sh b/test/test_regexp.sh similarity index 100% rename from tests/test_regexp.sh rename to test/test_regexp.sh diff --git a/tests/test_utf8.sh b/test/test_utf8.sh similarity index 100% rename from tests/test_utf8.sh rename to test/test_utf8.sh