Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed support OSes and Fixed scripts, etc #41

Merged
merged 1 commit into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build_helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ if [ "${RUN_SHELLCHECK}" -eq 1 ]; then
# Fedora
#
if ({ RUNCMD "${INSTALLER_BIN}" "${INSTALL_CMD}" "${INSTALL_CMD_ARG}" "${INSTALL_AUTO_ARG}" ShellCheck || echo > "${PIPEFAILURE_FILE}"; } | sed -e 's/^/ /g') && rm "${PIPEFAILURE_FILE}" >/dev/null 2>&1; then
PRNERR "Failed to install cppcheck"
PRNERR "Failed to install shellcheck"
exit 1
fi

Expand All @@ -1377,7 +1377,7 @@ if [ "${RUN_SHELLCHECK}" -eq 1 ]; then
# Ubuntu or Debian
#
if ({ RUNCMD "${INSTALLER_BIN}" "${INSTALL_CMD}" "${INSTALL_CMD_ARG}" "${INSTALL_AUTO_ARG}" shellcheck || echo > "${PIPEFAILURE_FILE}"; } | sed -e 's/^/ /g') && rm "${PIPEFAILURE_FILE}" >/dev/null 2>&1; then
PRNERR "Failed to install cppcheck"
PRNERR "Failed to install shellcheck"
exit 1
fi

Expand All @@ -1386,7 +1386,7 @@ if [ "${RUN_SHELLCHECK}" -eq 1 ]; then
# Alpine
#
if ({ RUNCMD "${INSTALLER_BIN}" "${INSTALL_CMD}" "${INSTALL_CMD_ARG}" "${INSTALL_AUTO_ARG}" shellcheck || echo > "${PIPEFAILURE_FILE}"; } | sed -e 's/^/ /g') && rm "${PIPEFAILURE_FILE}" >/dev/null 2>&1; then
PRNERR "Failed to install cppcheck"
PRNERR "Failed to install shellcheck"
exit 1
fi

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,15 @@ jobs:
container:
- ubuntu:24.04
- ubuntu:22.04
- ubuntu:20.04
- debian:bookworm
- debian:bullseye
- rockylinux:9
- rockylinux:8
- fedora:41
- fedora:40
- alpine:3.21
- alpine:3.20
- alpine:3.19
- alpine:3.18

container:
image: ${{ matrix.container }}
Expand Down
26 changes: 6 additions & 20 deletions .github/workflows/ostypevars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,20 +116,6 @@ elif echo "${CI_OSTYPE}" | grep -q -i -e "ubuntu:22.04" -e "ubuntu:jammy"; then
PKG_EXT="deb"
IS_OS_UBUNTU=1

elif echo "${CI_OSTYPE}" | grep -q -i -e "ubuntu:20.04" -e "ubuntu:focal"; then
DIST_TAG="ubuntu/focal"
INSTALL_PKG_LIST="git autoconf autotools-dev make dh-make fakeroot dpkg-dev devscripts pkg-config ruby-dev rubygems rubygems-integration procps"
INSTALLER_BIN="apt-get"
UPDATE_CMD="update"
UPDATE_CMD_ARG=""
INSTALL_CMD="install"
INSTALL_CMD_ARG=""
INSTALL_AUTO_ARG="-y"
INSTALL_QUIET_ARG="-qq"
PKG_OUTPUT_DIR="debian_build"
PKG_EXT="deb"
IS_OS_UBUNTU=1

elif echo "${CI_OSTYPE}" | grep -q -i -e "debian:12" -e "debian:bookworm"; then
DIST_TAG="debian/bookworm"
INSTALL_PKG_LIST="git autoconf autotools-dev make dh-make fakeroot dpkg-dev devscripts pkg-config ruby-dev rubygems rubygems-integration procps"
Expand Down Expand Up @@ -214,8 +200,8 @@ elif echo "${CI_OSTYPE}" | grep -q -i "fedora:40"; then
PKG_EXT="rpm"
IS_OS_FEDORA=1

elif echo "${CI_OSTYPE}" | grep -q -i "alpine:3.20"; then
DIST_TAG="alpine/v3.20"
elif echo "${CI_OSTYPE}" | grep -q -i "alpine:3.21"; then
DIST_TAG="alpine/v3.21"
INSTALL_PKG_LIST="bash sudo alpine-sdk automake autoconf util-linux-misc musl-locales ruby-dev procps coreutils k2hr3-cli"
INSTALLER_BIN="apk"
UPDATE_CMD="update"
Expand All @@ -228,8 +214,8 @@ elif echo "${CI_OSTYPE}" | grep -q -i "alpine:3.20"; then
PKG_EXT="apk"
IS_OS_ALPINE=1

elif echo "${CI_OSTYPE}" | grep -q -i "alpine:3.19"; then
DIST_TAG="alpine/v3.19"
elif echo "${CI_OSTYPE}" | grep -q -i "alpine:3.20"; then
DIST_TAG="alpine/v3.20"
INSTALL_PKG_LIST="bash sudo alpine-sdk automake autoconf util-linux-misc musl-locales ruby-dev procps coreutils k2hr3-cli"
INSTALLER_BIN="apk"
UPDATE_CMD="update"
Expand All @@ -242,8 +228,8 @@ elif echo "${CI_OSTYPE}" | grep -q -i "alpine:3.19"; then
PKG_EXT="apk"
IS_OS_ALPINE=1

elif echo "${CI_OSTYPE}" | grep -q -i "alpine:3.18"; then
DIST_TAG="alpine/v3.18"
elif echo "${CI_OSTYPE}" | grep -q -i "alpine:3.19"; then
DIST_TAG="alpine/v3.19"
INSTALL_PKG_LIST="bash sudo alpine-sdk automake autoconf util-linux-misc musl-locales ruby-dev procps coreutils k2hr3-cli"
INSTALLER_BIN="apk"
UPDATE_CMD="update"
Expand Down
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

Wrote from scratch the initial version of k2hdkc dbaas cli.

3. Hirotaka Wakabayashi <hiwakaba@yahoo-corp.jp>
2. Hirotaka Wakabayashi <hiwakaba@lycorp.co.jp>

Technical engineer of k2hdkc dbaas cli product.
51 changes: 24 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ K2HDKC DBaaS Command Line Interface(K2HR3 CLI Plugin)
[![GitHub forks](https://img.shields.io/github/forks/yahoojapan/k2hdkc_dbaas_cli.svg)](https://github.com/yahoojapan/k2hdkc_dbaas_cli/network)
[![GitHub stars](https://img.shields.io/github/stars/yahoojapan/k2hdkc_dbaas_cli.svg)](https://github.com/yahoojapan/k2hdkc_dbaas_cli/stargazers)
[![GitHub issues](https://img.shields.io/github/issues/yahoojapan/k2hdkc_dbaas_cli.svg)](https://github.com/yahoojapan/k2hdkc_dbaas_cli/issues)
[![debian packages](https://img.shields.io/badge/deb-packagecloud.io-844fec.svg)](https://packagecloud.io/antpickax/stable)
[![RPM packages](https://img.shields.io/badge/rpm-packagecloud.io-844fec.svg)](https://packagecloud.io/antpickax/stable)
[![debian packages](https://img.shields.io/badge/deb-packagecloud.io-844fec.svg)](https://packagecloud.io/antpickax/stable)
[![ALPINE packages](https://img.shields.io/badge/apk-packagecloud.io-844fec.svg)](https://packagecloud.io/antpickax/stable)

### **K2HDKC** **DBaaS**

Expand Down Expand Up @@ -46,37 +47,33 @@ The overall **K2HDKC DBaaS CLI** overview diagram is shown below.
![K2HDKC DBaaS system](https://dbaas.k2hdkc.antpick.ax/images/overview_cli.png)

### Documents
[K2HDKC DBaaS Document](https://dbaas.k2hdkc.antpick.ax/index.html)
[Github wiki page](https://github.com/yahoojapan/k2hdkc_dbaas_cli/wiki)

[About k2hdkc Document](https://k2hdkc.antpick.ax/index.html)
[About chmpx Document](https://chmpx.antpick.ax/index.html)
[About k2hr3 Document](https://k2hr3.antpick.ax/index.html)
- [K2HDKC DBaaS Document](https://dbaas.k2hdkc.antpick.ax/index.html)
- [Github wiki page](https://github.com/yahoojapan/k2hdkc_dbaas_cli/wiki)

[About AntPickax](https://antpick.ax/)
- [About k2hdkc Document](https://k2hdkc.antpick.ax/index.html)
- [About chmpx Document](https://chmpx.antpick.ax/index.html)
- [About k2hr3 Document](https://k2hr3.antpick.ax/index.html)
- [About AntPickax](https://antpick.ax/)

### Repositories
[k2hdkc_dbaas](https://github.com/yahoojapan/k2hdkc_dbaas)
[k2hdkc_dbaas_k8s_cli](https://github.com/yahoojapan/k2hdkc_dbaas_k8s_cli)
[k2hr3](https://github.com/yahoojapan/k2hr3)
[k2hr3_app](https://github.com/yahoojapan/k2hr3_app)
[k2hr3_api](https://github.com/yahoojapan/k2hr3_api)
[k2hr3_cli](https://github.com/yahoojapan/k2hr3_cli)
[k2hr3_get_resource](https://github.com/yahoojapan/k2hr3_get_resource)
[k2hdkc](https://github.com/yahoojapan/k2hdkc)
[k2hdkc_dbaas_override_conf](https://github.com/yahoojapan/k2hdkc_dbaas_override_conf)
[chmpx](https://github.com/yahoojapan/chmpx)
- [k2hdkc](https://github.com/yahoojapan/k2hdkc)
- [chmpx](https://github.com/yahoojapan/chmpx)
- [k2hdkc_dbaas](https://github.com/yahoojapan/k2hdkc_dbaas)
- [k2hdkc_dbaas_k8s_cli](https://github.com/yahoojapan/k2hdkc_dbaas_k8s_cli)
- [k2hdkc_dbaas_cli](https://github.com/yahoojapan/k2hdkc_dbaas_cli)
- [k2hdkc_dbaas_override_conf](https://github.com/yahoojapan/k2hdkc_dbaas_override_conf)
- [k2hdkc_dbaas_trove](https://github.com/yahoojapan/k2hdkc_dbaas_trove)
- [k2hr3](https://github.com/yahoojapan/k2hr3)
- [k2hr3_app](https://github.com/yahoojapan/k2hr3_app)
- [k2hr3_api](https://github.com/yahoojapan/k2hr3_api)
- [k2hr3_cli](https://github.com/yahoojapan/k2hr3_cli)
- [k2hr3_get_resource](https://github.com/yahoojapan/k2hr3_get_resource)
- [k2hr3client_python](https://github.com/yahoojapan/k2hr3client_python)

### Packages
[k2hdkc(packagecloud.io)](https://packagecloud.io/app/antpickax/stable/search?q=k2hdkc)
[chmpx(packagecloud.io)](https://packagecloud.io/app/antpickax/stable/search?q=chmpx)
[k2hdkc-dbaas-cli(packagecloud.io)](https://packagecloud.io/app/antpickax/stable/search?q=k2hdkc-dbaas-cli)
[k2hdkc-dbaas-k8s-cli(packagecloud.io)](https://packagecloud.io/app/antpickax/stable/search?q=k2hdkc-dbaas-k8s-cli)
[k2hdkc-dbaas-override-conf(packagecloud.io)](https://packagecloud.io/app/antpickax/stable/search?q=k2hdkc-dbaas-override-conf)
[k2hr3-cli(packagecloud.io)](https://packagecloud.io/app/antpickax/stable/search?q=k2hr3-cli)
[k2hr3-app(npm packages)](https://www.npmjs.com/package/k2hr3-app)
[k2hr3-api(npm packages)](https://www.npmjs.com/package/k2hr3-api)
[k2hr3-get-resource(packagecloud.io)](https://packagecloud.io/app/antpickax/stable/search?q=k2hr3-get-resource)
- [RPM packages(packagecloud.io)](https://packagecloud.io/app/antpickax/stable/search?q=k2hdkc-dbaas-cli&filter=rpm&dist=&arch=)
- [Debian packages(packagecloud.io)](https://packagecloud.io/app/antpickax/stable/search?q=k2hdkc-dbaas-cli&filter=deb&dist=&arch=)
- [ALPINE packages(packagecloud.io)](https://packagecloud.io/app/antpickax/stable/search?q=k2hdkc-dbaas-cli&filter=all&dist=alpine&arch=)

### License
This software is released under the MIT License, see the license file.
Expand Down
8 changes: 4 additions & 4 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,18 @@ while [ $# -ne 0 ]; do
echo "[ERROR] Parameters are something wrong."
exit 1

elif [ "$1" = "-h" ] || [ "$1" = "-H" ] || [ "$1" = "--help" ] || [ "$1" = "--HELP" ]; then
elif echo "$1" | grep -q -i -e "^-h$" -e "^--help$"; then
echo "Usage: ${AUTOGEN_NAME} [--help(-h)] [--no_update_version_file(-nu)] [--no_aclocal_force(-na)] [--no_check_ver_diff(-nc)]"
exit 0

elif [ "$1" = "-nu" ] || [ "$1" = "-NU" ] || [ "$1" = "--no_update_version_file" ] || [ "$1" = "--NO_UPDATE_VERSION_FILE" ]; then
elif echo "$1" | grep -q -i -e "^-nu$" -e "^--no_update_version_file$"; then
UPDATE_VERSION_FILE=0
FORCEPARAM="" # do not need force

elif [ "$1" = "-na" ] || [ "$1" = "-NA" ] || [ "$1" = "--no_aclocal_force" ] || [ "$1" = "--NO_ACLOCAL_FORCE" ]; then
elif echo "$1" | grep -q -i -e "^-na$" -e "^--no_aclocal_force$"; then
FORCEPARAM=""

elif [ "$1" = "-nc" ] || [ "$1" = "-NC" ] || [ "$1" = "--no_check_ver_diff" ] || [ "$1" = "--NO_CHECK_VER_DIFF" ]; then
elif echo "$1" | grep -q -i -e "^-nc$" -e "^--no_check_ver_diff$"; then
PARAMETERS="$1"

else
Expand Down
8 changes: 4 additions & 4 deletions buildutils/alpine_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ while [ $# -ne 0 ]; do
if [ -z "$1" ]; then
break

elif [ "$1" = "-h" ] || [ "$1" = "-H" ] || [ "$1" = "--help" ] || [ "$1" = "--HELP" ]; then
elif echo "$1" | grep -q -i -e "^-h$" -e "^--help$"; then
func_usage "${PRGNAME}"
exit 0

elif [ "$1" = "-b" ] || [ "$1" = "-B" ] || [ "$1" = "--buildnum" ] || [ "$1" = "--BUILDNUM" ]; then
elif echo "$1" | grep -q -i -e "^-b$" -e "^--buildnum$"; then
if [ -n "${BUILD_NUMBER}" ]; then
echo "[ERROR] Already --buildnum(-b) option is specified(${BUILD_NUMBER})." 1>&2
exit 1
Expand All @@ -119,7 +119,7 @@ while [ $# -ne 0 ]; do
fi
BUILD_NUMBER="$1"

elif [ "$1" = "-p" ] || [ "$1" = "-P" ] || [ "$1" = "--product" ] || [ "$1" = "--PRODUCT" ]; then
elif echo "$1" | grep -q -i -e "^-p$" -e "^--product$"; then
if [ -n "${PACKAGE_NAME}" ]; then
echo "[ERROR] Already --product(-p) option is specified(${PACKAGE_NAME})." 1>&2
exit 1
Expand All @@ -131,7 +131,7 @@ while [ $# -ne 0 ]; do
fi
PACKAGE_NAME="$1"

elif [ "$1" = "-y" ] || [ "$1" = "-Y" ] || [ "$1" = "--yes" ] || [ "$1" = "--YES" ]; then
elif echo "$1" | grep -q -i -e "^-y$" -e "^--yes$"; then
if [ "${NO_INTERACTIVE}" -ne 0 ]; then
echo "[ERROR] Already --yes(-y) option is specified." 1>&2
exit 1
Expand Down
18 changes: 9 additions & 9 deletions buildutils/debian_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ while [ $# -ne 0 ]; do
if [ -z "$1" ]; then
break

elif [ "$1" = "-h" ] || [ "$1" = "-H" ] || [ "$1" = "--help" ] || [ "$1" = "--HELP" ]; then
elif echo "$1" | grep -q -i -e "^-h$" -e "^--help$"; then
func_usage "${PRGNAME}"
exit 0

elif [ "$1" = "-b" ] || [ "$1" = "-B" ] || [ "$1" = "--buildnum" ] || [ "$1" = "--BUILDNUM" ]; then
elif echo "$1" | grep -q -i -e "^-b$" -e "^--buildnum$"; then
if [ "${BUILD_NUMBER}" -ne 0 ]; then
echo "[ERROR] Already --buildnum(-b) option is specified(${BUILD_NUMBER})." 1>&2
exit 1
Expand All @@ -128,7 +128,7 @@ while [ $# -ne 0 ]; do
fi
BUILD_NUMBER="$1"

elif [ "$1" = "-p" ] || [ "$1" = "-P" ] || [ "$1" = "--product" ] || [ "$1" = "--PRODUCT" ]; then
elif echo "$1" | grep -q -i -e "^-p$" -e "^--product$"; then
if [ -n "${PACKAGE_NAME}" ]; then
echo "[ERROR] Already --product(-p) option is specified(${PACKAGE_NAME})." 1>&2
exit 1
Expand All @@ -140,7 +140,7 @@ while [ $# -ne 0 ]; do
fi
PACKAGE_NAME="$1"

elif [ "$1" = "-c" ] || [ "$1" = "-C" ] || [ "$1" = "--class" ] || [ "$1" = "--CLASS" ]; then
elif echo "$1" | grep -q -i -e "^-c$" -e "^--class$"; then
if [ -n "${PKG_CLASS_NAME}" ]; then
echo "[ERROR] Already --class(-c) option is specified(${PKG_CLASS_NAME})." 1>&2
exit 1
Expand All @@ -152,7 +152,7 @@ while [ $# -ne 0 ]; do
fi
PKG_CLASS_NAME="$1"

elif [ "$1" = "-dt" ] || [ "$1" = "-DT" ] || [ "$1" = "--disttype" ] || [ "$1" = "--DISTTYPE" ]; then
elif echo "$1" | grep -q -i -e "^-dt$" -e "^--disttype$"; then
if [ -n "${OS_VERSION_NAME}" ]; then
echo "[ERROR] Already --disttype(-dt) option is specified(${OS_VERSION_NAME})." 1>&2
exit 1
Expand All @@ -164,14 +164,14 @@ while [ $# -ne 0 ]; do
fi
OS_VERSION_NAME="$1"

elif [ "$1" = "-r" ] || [ "$1" = "-R" ] || [ "$1" = "--rootdir" ] || [ "$1" = "--ROOTDIR" ]; then
elif echo "$1" | grep -q -i -e "^-r$" -e "^--rootdir$"; then
if [ "${IS_ROOTDIR}" -ne 0 ]; then
echo "[ERROR] Already --rootdir(-r) option is specified." 1>&2
exit 1
fi
IS_ROOTDIR=1

elif [ "$1" = "-y" ] || [ "$1" = "-Y" ] || [ "$1" = "--yes" ] || [ "$1" = "--YES" ]; then
elif echo "$1" | grep -q -i -e "^-y$" -e "^--yes$"; then
if [ "${NO_INTERACTIVE}" -ne 0 ]; then
echo "[ERROR] Already --yes(-y) option is specified." 1>&2
exit 1
Expand Down Expand Up @@ -255,9 +255,9 @@ if [ "${NO_INTERACTIVE}" -eq 0 ]; then
printf '[INPUT] Confirm (y/n) : '
read -r CONFIRM

if [ "${CONFIRM}" = "y" ] || [ "${CONFIRM}" = "Y" ] || [ "${CONFIRM}" = "yes" ] || [ "${CONFIRM}" = "YES" ]; then
if echo "${CONFIRM}" | grep -q -i -e "^y$" -e "^yes$"; then
IS_CONFIRMED=1
elif [ "${CONFIRM}" = "n" ] || [ "${CONFIRM}" = "N" ] || [ "${CONFIRM}" = "no" ] || [ "${CONFIRM}" = "NO" ]; then
elif echo "${CONFIRM}" | grep -q -i -e "^n$" -e "^no$"; then
echo "Interrupt this processing, bye..."
exit 0
fi
Expand Down
11 changes: 5 additions & 6 deletions buildutils/make_release_version_file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,31 +68,31 @@ while [ $# -ne 0 ]; do
if [ -z "$1" ]; then
break

elif [ "$1" = "-h" ] || [ "$1" = "-H" ] || [ "$1" = "--help" ] || [ "$1" = "--HELP" ]; then
elif echo "$1" | grep -q -i -e "^-h$" -e "^--help$"; then
func_usage "${PRGNAME}"
exit 0

elif [ "$1" = "-ng" ] || [ "$1" = "-NG" ] || [ "$1" = "--not_use_git" ] || [ "$1" = "--NOT_USE_GIT" ]; then
elif echo "$1" | grep -q -i -e "^-ng$" -e "^--not_use_git$"; then
if [ "${NOT_USE_GIT}" -ne 0 ]; then
echo "[ERROR] already --not_use_git(-ng) option is specified." 1>&2
exit 1
fi
NOT_USE_GIT=1

elif [ "$1" = "-nd" ] || [ "$1" = "-ND" ] || [ "$1" = "--no_check_ver_diff" ] || [ "$1" = "--NO_CHECK_VER_DIFF" ]; then
elif echo "$1" | grep -q -i -e "^-nd$" -e "^--no_check_ver_diff$"; then
if [ "${NO_CHECK_VER_DIFF}" -ne 0 ]; then
echo "[ERROR] already --no_check_ver_diff(-nd) option is specified." 1>&2
exit 1
fi
NO_CHECK_VER_DIFF=1

elif [ "$1" = "-f" ] || [ "$1" = "-F" ] || [ "$1" = "--file" ] || [ "$1" = "--FILE" ]; then
elif echo "$1" | grep -q -i -e "^-f$" -e "^--file$"; then
if [ -n "${CHANGELOG_FILE}" ]; then
echo "[ERROR] already --file(-f) option is specified(${CHANGELOG_FILE})." 1>&2
exit 1
fi
shift
if [ $# -eq 0 ] || [ -z "$1" ]; then
if [ $# -eq 0 ]; then
echo "[ERROR] Must set changelog file path after -file(-f) option." 1>&2
exit 1
fi
Expand Down Expand Up @@ -289,4 +289,3 @@ exit 0
# vim600: noexpandtab sw=4 ts=4 fdm=marker
# vim<600: noexpandtab sw=4 ts=4
#

2 changes: 1 addition & 1 deletion buildutils/make_rpm_changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ while [ $# -ne 0 ]; do
if [ -z "$1" ]; then
break

elif [ "$1" = "-h" ] || [ "$1" = "-H" ] || [ "$1" = "--help" ] || [ "$1" = "--HELP" ]; then
elif echo "$1" | grep -q -i -e "^-h$" -e "^--help$"; then
func_usage "${PRGNAME}"
exit 0

Expand Down
Loading