Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Bump nanoid from 3.3.7 to 3.3.8 in /views/_dev #28

Bump nanoid from 3.3.7 to 3.3.8 in /views/_dev

Bump nanoid from 3.3.7 to 3.3.8 in /views/_dev #28

Workflow file for this run

name: Create module zip
on: [ push ]
env:
PROJECT_NAME: axeptiocookies
jobs:
zip:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install PHP 5.6
uses: shivammathur/setup-php@v2
with:
php-version: '5.6'
- name: Setup node env
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install node dependencies
working-directory: ./views/_dev
run: npm i
- name: Build assets
working-directory: ./views/_dev
run: npm run build
- name: Package zip
run: |
PROJECT_DIR=$(pwd)
sudo apt-get update && sudo apt-get install xmlstarlet -y
MODULE_VERSION=$(xmlstarlet sel -t -v '/project/property[@name="TARGETVERSION"]/@value' 202/build.xml)
find ./ -type f -exec sed -i "s/@version@/$MODULE_VERSION/g" {} +
composer global require prestashop/autoindex
[ -f "./index.php" ] && [ -f "$HOME/.composer/vendor/prestashop/autoindex/assets/index.php" ] && cat index.php > ~/.composer/vendor/prestashop/autoindex/assets/index.php
~/.composer/vendor/bin/autoindex --exclude=202
rm -f composer.lock
[ -d "./vendor" ] && find ./vendor -mindepth 1 ! -regex '^./vendor/totpsclasslib\(/.*\)?' -delete
composer remove phpstan/phpstan phpunit/phpunit prestashop/php-dev-tools prestashop/header-stamp --no-progress --dev --no-install --no-update
composer install --no-dev --optimize-autoloader --classmap-authoritative
rm 202 node_modules composer.* node_modules _dev .git tests var views/_dev -Rf
rm docker-compose.yml browserlist .stylelintignore .editorconfig babel.config.js webpack.config.js postcss.config.js cache.properties sonar-project.properties config_fr.xml composer.json composer.lock composer.phar .gitignore .browserlistrc .eslintrc.js .postcssrc.js babel.config.js vue.config.js package.json package-lock.json .php-cs-fixer.dist.php .php_cs.cache .php-cs-fixer.cache .gitlab-ci.yml before_autoload.sh Makefile -Rf
[ -d ../packages ] || mkdir ../packages
rm -Rf ../packages/$PROJECT_NAME
mkdir ../packages/$PROJECT_NAME
cd ../
zip -9 -r -q --exclude=\*.DS_Store\* --exclude=\*._.DS_Store\* --exclude=\*__MACOSX\* --exclude=\*.buildpath\* --exclude=\*.dropbox\* --exclude=\*.git\* --exclude=\*.idea\* --exclude=\*.project\* --exclude=\*.sass-cache\* --exclude=\*.settings\* --exclude=\*.svn\* --exclude=\*config.codekit\* --exclude=\*desktop.ini\* --exclude=\*nbproject\* --exclude=\*.log --exclude=$PROJECT_NAME/config.xml --exclude=$PROJECT_NAME/config_\*.xml $PROJECT_DIR/../packages/$PROJECT_NAME/$PROJECT_NAME.zip ./$PROJECT_NAME
cd $PROJECT_DIR/../packages/$PROJECT_NAME
unzip -qq $PROJECT_NAME.zip
cd $PROJECT_DIR/../packages/$PROJECT_NAME/$PROJECT_NAME
find . -type f -exec md5sum "{}" + > ../$PROJECT_NAME.md5
cd $PROJECT_DIR/../packages/$PROJECT_NAME
rm -Rf $PROJECT_DIR
mkdir $PROJECT_DIR
cp *.zip $PROJECT_DIR
cp *.md5 $PROJECT_DIR
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}
path: |
.