From 3dab30462a6319ce2e4ee589d3d3783b8046cda4 Mon Sep 17 00:00:00 2001 From: asandikci Date: Wed, 9 Aug 2023 23:47:40 +0300 Subject: [PATCH] feat: update docker file - remove unnecessary docker dependencies - add full functionality to docker-build.sh file - mini bugfixes --- build/package/docker/Dockerfile | 8 +------- scripts/docker-build.sh | 15 ++++++++++----- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/build/package/docker/Dockerfile b/build/package/docker/Dockerfile index d49cce7..4cc368d 100644 --- a/build/package/docker/Dockerfile +++ b/build/package/docker/Dockerfile @@ -1,7 +1,7 @@ # docker build -t IMAGE_NAME:VERSION . # after cd ahenk-go -# docker run -it -d --ulimit nofile=1024:524288 --name CONT_NAME --mount type=bind,source=".",target=/ahenk-go/ IMAGE_NAME:VERSION "/bin/bash" +# docker run -it -d --name CONT_NAME --mount type=bind,source=".",target=/ahenk-go/ IMAGE_NAME:VERSION "/bin/bash" ARG CODE_VERSION=latest @@ -16,18 +16,12 @@ RUN apt-get upgrade -y RUN apt-get install curl wget tree nano -y ### INSTALL BUILD DEPENDENCIES ### -RUN apt-get install pbuilder -y RUN apt-get install dh-golang -y RUN apt-get install dh-make-golang -y -RUN apt-get install cowbuilder -y RUN apt-get install golang-github-sevlyar-go-daemon-dev -y RUN apt-get install golang-golang-x-exp-dev -y ### CONFIGURATIONS ### -RUN mkdir /var/cache/pbuilder/base.cow -# RUN cowbuilder --create -# FIXME Build Error - # Enable UTF8 Encoding RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen diff --git a/scripts/docker-build.sh b/scripts/docker-build.sh index a49f236..92ffd6a 100644 --- a/scripts/docker-build.sh +++ b/scripts/docker-build.sh @@ -13,16 +13,15 @@ cd /build || exit 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) -nano itp-ahenk-go.txt -sendmail -t < itp-ahenk-go.txt +nano "itp-$GIT_REPO.txt" +sendmail -t < "itp-$GIT_REPO.txt" -cd ahenk-go || exit +cd $GIT_REPO || exit grep --color=always -r TODO debian 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 -# Edit files that contains TODO keyword until there is none of them while [[ $(grep -r TODO debian | wc --lines) -ne 0 ]] do nano "$(grep -r TODO debian | awk '{sub(/:.*/,"")} NR==1')" @@ -42,4 +41,10 @@ head -100 debian/**/* # TODO ask user to continue -git add debian && git commit -a -m 'Initial packaging' \ No newline at end of file +git add debian && git commit -a -m 'Initial packaging' + +gbp buildpackage + +lintian -- *.changes + +echo -e "SOLVE LINTIAN ERRORS / WARNINGS\nAFTER THAT, PUSH REPO" \ No newline at end of file