diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d24cfd47..76921748 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -73,10 +73,12 @@ package: when: manual stage: package script: + - apt-get update + - apt-get install zip unzip - cd api - composer install --no-dev - cd ../ci - - bash build_release.sh + - bash build_zip.sh artifacts: paths: - - release/ + - release.zip diff --git a/ci/build_release.sh b/ci/build_release.sh deleted file mode 100644 index c32361df..00000000 --- a/ci/build_release.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -cd ../ -mkdir release -TARGETDIR=release;for file in *;do test "$file" != "$TARGETDIR" && cp -r "$file" "$TARGETDIR/";done - -# Remove files that we don't want to bundle -cd release -rm -rf ci -rm -rf .git -rm apidoc.json -rm CONTRIBUTING.md - -cd ../ \ No newline at end of file diff --git a/ci/build_zip.sh b/ci/build_zip.sh new file mode 100644 index 00000000..be8868c3 --- /dev/null +++ b/ci/build_zip.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +cd ../ +mkdir $VERSION_NUMBER +TARGETDIR=$VERSION_NUMBER;for file in *;do test "$file" != "$TARGETDIR" && cp -r "$file" "$TARGETDIR/";done + +# Remove files that we don't want to bundle +cd $VERSION_NUMBER +rm -rf ci +rm -rf .git +rm apidoc.json +rm CONTRIBUTING.md + +cd ../ +zip -r release.zip $VERSION_NUMBER +rm -rf $VERSION_NUMBER \ No newline at end of file