mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-11 10:46:43 +02:00
ci(gitlabci): add easy-coding-standard check for code-style + fix quality scripts
This commit is contained in:
parent
aa1612342e
commit
6802bee0db
8 changed files with 59 additions and 51 deletions
12
scripts/bundle-prepare.sh
Normal file
12
scripts/bundle-prepare.sh
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
# delete possibly installed git hooks because captainhooks (dev dependency)
|
||||
# isn't included in the production dependencies
|
||||
rm -rf ./.git/hooks
|
||||
|
||||
# install only dev dependencies using the --no-dev option
|
||||
php composer.phar install --no-dev --prefer-dist --no-ansi --no-interaction --no-progress --ignore-platform-reqs
|
||||
|
||||
# install js dependencies and build all production UI assets
|
||||
npm install
|
||||
npm run build
|
||||
|
|
@ -4,20 +4,23 @@ VERSION=$1
|
|||
COMPOSER_VERSION=$(echo "$VERSION" | perl -pe 's/(?<=[alpha|beta])\.//g')
|
||||
|
||||
# replace composer.json version using jq
|
||||
apt-get install jq -y
|
||||
echo "$( jq '.version = "'$COMPOSER_VERSION'"' composer.json )" > composer.json
|
||||
|
||||
# replace CP_VERSION constant in app/config/constants
|
||||
sed -i "s/^defined('CP_VERSION').*/defined('CP_VERSION') || define('CP_VERSION', '$VERSION');/" ./app/Config/Constants.php
|
||||
|
||||
# install wget to download archives
|
||||
apt-get install wget
|
||||
|
||||
# download GeoLite2-City archive and extract it to writable/uploads
|
||||
wget -c "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=$MAXMIND_LICENCE_KEY&suffix=tar.gz" -O - | tar -xz -C ./writable/uploads/
|
||||
|
||||
# rename extracted archives' folders
|
||||
mv ./writable/uploads/GeoLite2-City* ./writable/uploads/GeoLite2-City
|
||||
|
||||
# install rsync for file transfers
|
||||
apt-get install rsync -y
|
||||
|
||||
# create castopo-host folder bundle: uses .rsync-filter (-F) file to copy only needed files
|
||||
rsync -aF --progress . ./castopod-host
|
||||
|
||||
# create zip and tar.gz packages for release upload
|
||||
zip -r castopod-host-$VERSION.zip castopod-host
|
||||
tar -zcvf castopod-host-$VERSION.tar.gz castopod-host
|
||||
7
scripts/package.sh
Normal file
7
scripts/package.sh
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
apt-get install zip -y
|
||||
|
||||
# create zip and tar.gz packages for release upload
|
||||
zip -r castopod-host-$VERSION.zip castopod-host
|
||||
tar -zcvf castopod-host-$VERSION.tar.gz castopod-host
|
||||
Loading…
Add table
Add a link
Reference in a new issue