Prechádzať zdrojové kódy

adding KY_GUI`s production runtime image, as well as a build script which updates the hub

logicp 5 rokov pred
rodič
commit
7c73d17b44

+ 8 - 0
.circleci/production/Dockerfile

@@ -0,0 +1,8 @@
+FROM jonathonf/manjaro:latest
+RUN pacman -Syu flatbuffers base-devel qt5-base noto-fonts ffmpeg --noconfirm
+ARG REBUILD_KY_GUI=false
+WORKDIR ky_gui
+RUN curl -o ky_gui http://artifact.stronglogicsolutions.com/download?name=ky_gui
+RUN chmod +x ky_gui
+RUN mkdir config && echo '{"defaultApp":"instagram"}' >> config/config.json
+RUN mkdir -p assets/previews

+ 35 - 0
.circleci/production/updateProductionContainer.sh

@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+
+
+IMAGE_NAME="logicp/ky_gui:production"
+CWD=$(cd $(dirname $0) && pwd)
+
+function rebuild_docker_image() {
+  if [[ ! -f Dockerfile ]]; then
+    echo "No Dockerfile found in $CWD"
+    exit 1
+  fi
+
+  docker build --build-arg REBUILD_KY_GUI=$(date +%s) -t $IMAGE_NAME .
+  if [[ $? -eq 0 ]]; then
+    docker push $IMAGE_NAME
+    if [[ $? -eq 0 ]]; then
+      echo "Image updated on docker hub!"
+      return 0
+    fi
+    echo "Image updated but not pushed to docker hub"
+    return 1
+  fi
+  echo "Image could not be updated"
+  return 1
+}
+
+
+rebuild_docker_image
+
+if [[ $? -eq 0 ]]; then
+  exit 0
+else
+  exit 1
+fi
+

+ 2 - 0
.gitignore

@@ -10,3 +10,5 @@ Makefile
 qrc_kres.*
 **/*.jpg
 assets
+config
+ky_gui_plugin_import.cpp