diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 76921748..d24cfd47 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -73,12 +73,10 @@ package: when: manual stage: package script: - - apt-get update - - apt-get install zip unzip - cd api - composer install --no-dev - cd ../ci - - bash build_zip.sh + - bash build_release.sh artifacts: paths: - - release.zip + - release/ diff --git a/ci/build_release.sh b/ci/build_release.sh new file mode 100644 index 00000000..c32361df --- /dev/null +++ b/ci/build_release.sh @@ -0,0 +1,14 @@ +#!/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 deleted file mode 100644 index be8868c3..00000000 --- a/ci/build_zip.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/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