diff --git a/Makefile b/Makefile index 16112b4..9b5bc04 100644 --- a/Makefile +++ b/Makefile @@ -17,3 +17,6 @@ build-deb-local: build-rpm-local: ./tool/main.sh build-rpm-local + +build-container-up: + ./tool/main.sh build-container-up diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..8a9ecc2 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.0.1 \ No newline at end of file diff --git a/tool/deb/Dockerfile b/tool/deb/Dockerfile index 1d8c998..24cfbd7 100644 --- a/tool/deb/Dockerfile +++ b/tool/deb/Dockerfile @@ -3,7 +3,7 @@ FROM ryoarima/ubuntu-${ARCH}:latest WORKDIR /root -COPY . /root/mark1 +COPY ./.. /root/mark1 RUN echo "Start" diff --git a/tool/deb/changelog b/tool/deb/changelog deleted file mode 100644 index e69de29..0000000 diff --git a/tool/deb/changelog.template b/tool/deb/changelog.template new file mode 100644 index 0000000..172c0db --- /dev/null +++ b/tool/deb/changelog.template @@ -0,0 +1,6 @@ +mark1 (${VERSION}) jammy; urgency=medium + + * Initial release of mark1. + * Implemented basic functionality. + + -- Ryo Arima ${DATETIME} \ No newline at end of file diff --git a/tool/deb/control b/tool/deb/control deleted file mode 100644 index e69de29..0000000 diff --git a/tool/deb/control.template b/tool/deb/control.template new file mode 100644 index 0000000..b93131d --- /dev/null +++ b/tool/deb/control.template @@ -0,0 +1,8 @@ +Package: mark1 +Version: ${VERSION} +Section: web +Priority: optional +Architecture: ${ARCH} +Depends: bash (>= 4.0) +Maintainer: Ryo Arima +Description: simple authorization management system \ No newline at end of file diff --git a/tool/deb/copyright b/tool/deb/copyright index e69de29..57757e3 100644 --- a/tool/deb/copyright +++ b/tool/deb/copyright @@ -0,0 +1,26 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: mark1 +Source: https://github.com/ryo-arima/mark1 + +Files: * +Copyright: 2024, Your Name +License: MIT + +License: MIT + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. \ No newline at end of file diff --git a/tool/docker-compose.yaml b/tool/docker-compose.yaml new file mode 100644 index 0000000..779d261 --- /dev/null +++ b/tool/docker-compose.yaml @@ -0,0 +1,14 @@ +services: + deb: + container_name: deb + build: + context: ../. + dockerfile: tool/deb/Dockerfile + command: sleep infinity + + rpm: + container_name: rpm + build: + context: ../. + dockerfile: tool/rpm/Dockerfile + command: sleep infinity \ No newline at end of file diff --git a/tool/main.sh b/tool/main.sh index d34df4e..84d7914 100755 --- a/tool/main.sh +++ b/tool/main.sh @@ -33,10 +33,15 @@ function build(){ function build-deb-local(){ ./tool/deb/build.sh run_on_local_container + date "+%a, %d %b %Y %H:%M:%S +0900" --date="2024-09-01 12:00:00" } function build-rpm-local(){ ./tool/rpm/build.sh run_on_local_container } +function build-container-up(){ + docker-compose -f ./tool/docker-compose.yaml up --build --force-recreate -d +} + $COMMAND \ No newline at end of file diff --git a/tool/rpm/Dockerfile b/tool/rpm/Dockerfile index 7cc7e0f..579d672 100644 --- a/tool/rpm/Dockerfile +++ b/tool/rpm/Dockerfile @@ -3,7 +3,7 @@ FROM ryoarima/rocky-${ARCH}:latest WORKDIR /root -COPY . /root/mark1 +COPY ./.. /root/mark1 RUN echo "Start"