From fdaa2b8592f641b6acaf634fe10f13991a073fc9 Mon Sep 17 00:00:00 2001 From: Alexandr Kosarev Date: Sun, 9 Sep 2018 22:03:31 +0300 Subject: [PATCH] Implement CI for releases Use mirror at gitlab.com to allow CI for releases --- .gitlab-ci.yaml | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ manifest.xml | 28 +++++++++++++++++++++++++ package.xml | 16 ++++++++++++++ 3 files changed, 100 insertions(+) create mode 100644 .gitlab-ci.yaml create mode 100644 manifest.xml create mode 100644 package.xml diff --git a/.gitlab-ci.yaml b/.gitlab-ci.yaml new file mode 100644 index 0000000..947f555 --- /dev/null +++ b/.gitlab-ci.yaml @@ -0,0 +1,56 @@ +stages: +- build + +release: + only: + - tags + stage: build + image: edbizarro/gitlab-ci-pipeline-php:7.0 + tags: + - docker + - gce + script: + - sudo apt-get update && sudo apt-get install -y zip wget + - mkdir -p library && mkdir -p packages + - composer install + - grep -E -o '(.*?)' ./manifest.xml + | + while read in; + do + rootdir=`pwd`; + file=$(echo $in | sed -r "s/.*?>(.*?)<\/.*?/\1/g"); + cp -f $file $rootdir/library/; + done; + - grep -E -o '(.*?)' ./manifest.xml + | + while read in; + do + rootdir=`pwd`; + folder=$(echo $in | sed -r "s/.*?>(.*?)<\/.*?/\1/g"); + cp -rf $folder $rootdir/library/; + done + - cp -f ./manifest.xml ./library/ + - grep -E -o '(.*?)' ./package.xml + | + while read in; + do + rootdir=`pwd`; + source=$(echo $in | sed -r "s/.*src=\"([^\"]*)\".*/\1/g"); + dest=$(echo $in | sed -r "s/.*>([^\.]*).zip<\/.*/\1/g"); + if [[ $source =~ ^https? ]]; + then + cd $rootdir/packages/; + wget --output-document=$dest.zip $source; + cd $rootdir; + else + cd $rootdir/$dest; + zip -r $rootdir/packages/$dest.zip ./*; + cd $rootdir/; + fi; + done + artifacts: + paths: + - packages/ + - package.xml + name: "pkg_JoomPlaceX_${CI_BUILD_REF_NAME}" + when: on_success \ No newline at end of file diff --git a/manifest.xml b/manifest.xml new file mode 100644 index 0000000..ff12e8a --- /dev/null +++ b/manifest.xml @@ -0,0 +1,28 @@ + + JoomPlaceX + JoomPlaceX + Alexandr Kosarev + September 2017 + (C) 2018 Joomplace. All rights reserved. + GPL3 + kosarev@joomplace.com + https://www.joomplace.com + 0.10.1 + + Helper + layouts + Legacy + Renderer + vendor + Wireframe + ComponentStarter.php + Controller.php + ControllerAPI.php + Dispatcher.php + Loader.php + Model.php + View.php + README.md + composer.lock + + \ No newline at end of file diff --git a/package.xml b/package.xml new file mode 100644 index 0000000..95030ea --- /dev/null +++ b/package.xml @@ -0,0 +1,16 @@ + + + JoomPlaceX + Joomplace Team + September 2018 + html5flippingbook_pro + support@joomplace.com + www.joomplace.com + Copyright (C) 2018 JoomPlace, www.joomplace.com. All rights reserved. + GNU/GPL http://www.gnu.org/copyleft/gpl.html + 0.10.1 + + library.zip + plg_autoloader.zip + + \ No newline at end of file