chore: update service name
This commit is contained in:
parent
e839c2e6dc
commit
5e8bb774e2
4 changed files with 44 additions and 27 deletions
|
@ -2,49 +2,66 @@
|
||||||
|
|
||||||
# see https://people.debian.org/~stapelberg/2015/07/27/dh-make-golang.html
|
# see https://people.debian.org/~stapelberg/2015/07/27/dh-make-golang.html
|
||||||
|
|
||||||
|
|
||||||
GIT_HOST="git.aliberksandikci.com.tr"
|
GIT_HOST="git.aliberksandikci.com.tr"
|
||||||
GIT_ORG="liderahenk"
|
GIT_ORG="liderahenk"
|
||||||
GIT_REPO="ahenk-go"
|
GIT_REPO="ahenk-go"
|
||||||
|
DEV_NAME="Aliberk Sandıkçı"
|
||||||
|
GIT_MAIL="git@aliberksandikci.com.tr"
|
||||||
|
|
||||||
|
echo "Editing git configs..."
|
||||||
|
git config --global init.defaultBranch main
|
||||||
|
git config --global user.name "$DEV_NAME"
|
||||||
|
git config --global user.email $GIT_MAIL
|
||||||
|
git config --global color.status auto
|
||||||
|
git config --global color.branch auto
|
||||||
|
git config --global color.interactive auto
|
||||||
|
git config --global color.diff auto
|
||||||
|
|
||||||
mkdir /build
|
mkdir /build
|
||||||
cd /build || exit
|
cd /build || exit
|
||||||
dh-make-golang make -allow_unknown_hoster "$GIT_HOST/$GIT_ORG/$GIT_REPO"
|
dh-make-golang make -allow_unknown_hoster "$GIT_HOST/$GIT_ORG/$GIT_REPO"
|
||||||
|
|
||||||
# TODO Add option to disable writing all these files all the time (-s --skip)
|
if [[ "$1" != "notodo" ]]; then
|
||||||
nano "itp-$GIT_REPO.txt"
|
|
||||||
sendmail -t < "itp-$GIT_REPO.txt"
|
|
||||||
|
|
||||||
cd $GIT_REPO || exit
|
# TODO Add option to disable writing all these files all the time (-s --skip)
|
||||||
grep --color=always -r TODO debian
|
nano "itp-$GIT_REPO.txt"
|
||||||
echo -e "\nThese files needs review. Starting reviewing automatically in 10sec...\n"
|
sendmail -t <"itp-$GIT_REPO.txt"
|
||||||
sleep 10
|
|
||||||
# TODO Allow users to escape from automatic review and manually do it while in this script
|
|
||||||
|
|
||||||
while [[ $(grep -r TODO debian | wc --lines) -ne 0 ]]
|
cd $GIT_REPO || exit
|
||||||
do
|
|
||||||
nano "$(grep -r TODO debian | awk '{sub(/:.*/,"")} NR==1')"
|
|
||||||
|
|
||||||
echo "Continuing from next file..."
|
|
||||||
sleep 1
|
|
||||||
grep --color=always -r TODO debian
|
grep --color=always -r TODO debian
|
||||||
sleep 5
|
echo -e "\nThese files needs review. Starting reviewing automatically in 10sec...\n"
|
||||||
|
sleep 10
|
||||||
|
# TODO Allow users to escape from automatic review and manually do it while in this script
|
||||||
|
|
||||||
# TODO Allow user to reviewing remaining files, choosing between them, optional skipping, and waiting for an answer (continue? [Y/n])
|
while [[ $(grep -r TODO debian | wc --lines) -ne 0 ]]; do
|
||||||
done
|
nano "$(grep -r TODO debian | awk '{sub(/:.*/,"")} NR==1')"
|
||||||
echo "ALL FILES DONE"
|
|
||||||
|
|
||||||
|
echo "Continuing from next file..."
|
||||||
|
sleep 1
|
||||||
|
grep --color=always -r TODO debian
|
||||||
|
sleep 5
|
||||||
|
|
||||||
|
# TODO Allow user to reviewing remaining files, choosing between them, optional skipping, and waiting for an answer (continue? [Y/n])
|
||||||
|
done
|
||||||
|
echo "ALL FILES DONE"
|
||||||
|
else
|
||||||
|
cd $GIT_REPO || exit
|
||||||
|
fi
|
||||||
|
dh_installsystemd
|
||||||
|
echo """
|
||||||
|
!/usr/bin/make -f
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh \$@ --builddirectory=_build --buildsystem=golang --with=golang --with-systemd
|
||||||
|
override_dh_auto_install:
|
||||||
|
dh_auto_install -- --no-source
|
||||||
|
""" > debian/rules
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
head -100 debian/**/*
|
head -100 debian/**/*
|
||||||
|
|
||||||
# TODO ask user to continue
|
# TODO ask user to continue
|
||||||
|
|
||||||
echo "Edit git configs..."
|
|
||||||
sleep 3
|
|
||||||
git config --global --edit
|
|
||||||
|
|
||||||
git add debian && git commit -a -m 'Initial packaging'
|
git add debian && git commit -a -m 'Initial packaging'
|
||||||
|
|
||||||
gbp buildpackage
|
gbp buildpackage
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
### --> Variable Set
|
### --> Variable Set
|
||||||
REPO_NAME="ahenk-go"
|
REPO_NAME="ahenk-go"
|
||||||
REPO_LINK="https://git.aliberksandikci.com.tr/liderahenk/${REPO_NAME}"
|
REPO_LINK="https://git.aliberksandikci.com.tr/liderahenk/${REPO_NAME}"
|
||||||
DAEMON_NAME="ahenkd-go"
|
DAEMON_NAME="ahenk-go"
|
||||||
CONF_DIR="/etc/ahenk-go/"
|
CONF_DIR="/etc/ahenk-go/"
|
||||||
TEMP_DIR="$(mktemp -d)"
|
TEMP_DIR="$(mktemp -d)"
|
||||||
MAIN_DIR="${TEMP_DIR}/${REPO_NAME}/"
|
MAIN_DIR="${TEMP_DIR}/${REPO_NAME}/"
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
### --> Variable Set
|
### --> Variable Set
|
||||||
REPO_NAME="ahenk-go"
|
REPO_NAME="ahenk-go"
|
||||||
DAEMON_NAME="ahenkd-go"
|
DAEMON_NAME="ahenk-go"
|
||||||
CONF_DIR="/etc/ahenk-go/"
|
CONF_DIR="/etc/ahenk-go/"
|
||||||
TEMP_DIR="$(mktemp -d)"
|
TEMP_DIR="$(mktemp -d)"
|
||||||
MAIN_DIR="${TEMP_DIR}/${REPO_NAME}/"
|
MAIN_DIR="${TEMP_DIR}/${REPO_NAME}/"
|
||||||
|
|
Loading…
Reference in a new issue