Skip to content

Commit

Permalink
Arf
Browse files Browse the repository at this point in the history
  • Loading branch information
betd-bmabille committed Sep 17, 2021
1 parent 8ba9179 commit e227d73
Show file tree
Hide file tree
Showing 15 changed files with 14,554 additions and 7,402 deletions.
101 changes: 96 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,35 @@
#!/usr/bin/env bash

ifndef VERBOSE
.SILENT:
endif


DOCKER_COMPOSE = docker-compose
DOCKER = docker

ifndef VERBOSE
.SILENT:
SYMFONY = $(EXEC_PHP) app/console

IMAGE_AUDIT = jakzal/phpqa:php7.4-alpine
QA = docker run --rm -v `pwd`/:/project -w /project $(IMAGE_AUDIT)

COMPOSER = ${QA} composer

REF_BRANCH ?= 'master'

ifndef QUIET
#normal mode display text
QUIET_PARAM :=
define display
@{ \
printf $1; \
}
endef
else
# quiet enabled do nothing
QUIET_PARAM := -q
define display
endef
endif

#
Expand All @@ -29,7 +54,7 @@ help:banner ## this help

build: ## Build docker
printf "\033[32m Deploy to Server \033[0m\n"
$(DOCKER_COMPOSE) build
$(DOCKER_COMPOSE) build

start: build ## Run project
printf " 🏃\033[33m Running application ... \033[0m\n"
Expand All @@ -44,11 +69,77 @@ stop: ## Stop the VMs
$(DOCKER_COMPOSE) stop
printf "\n\n"

##
## Vendor and Assets
## -----------------

composer.lock: ## Run composer update
$(COMPOSER) update --lock --no-interaction --no-suggest

vendor: composer.lock ## Run composer install
printf " 💽\033[33m Start Composer ... \033[0m\n"
$(COMPOSER) install ${QUIET_PARAM}

assets: ## Compile assets
$(DOCKER) run --rm -v `pwd`/:/project -w /project node yarn install
$(DOCKER) run --rm -v `pwd`/:/project -w /project node yarn encore dev

migration: ## Generate a new doctrine migration
$(SYMFONY) doctrine:migrations:diff

migrate: ## Play latest doctrine migrations on comutitres and alert database
$(SYMFONY) doctrine:migrations:migrate --no-interaction --allow-no-migration $(QUIET_PARAM)

db-validate-schema: ## Validate the doctrine ORM mapping
$(SYMFONY) doctrine:schema:validate

.PHONY: assets vendor composer.lock

lint: lp lt ly

lt: ## lint twig files
$(QA) find . -iname '*.twig' -exec twig-lint -q lint {} \;

ly: ## lint yaml files
$(QA) sh -c "find app/config -iname '*.yml' -print0 | xargs -0 -n1 yaml-lint;"

lp: ## lint php files
$(QA) parallel-lint --blame --exclude vendor .

security: ## Check security of your dependencies (https://security.sensiolabs.org/)
$(QA) local-php-security-checker

psalm: ## Finds errors in PHP applications
$(QA) psalm --find-dead-code

rector: ## Tool for instant code upgrades and refactoring
$(QA) rector process src --dry-run

phpmd: ## PHP Mess Detector (https://phpmd.org)
$(QA) phpmd src text .phpmd.xml

phpcpd: ## PHP Copy/Paste Detector (https://github.com/sebastianbergmann/phpcpd)
$(QA) phpcpd src

php_codesnifer: ## PHP_CodeSnifer (https://github.com/squizlabs/PHP_CodeSniffer)
$(QA) phpcs -d memory_limit=-1 --standard=.phpcs.xml src

phpmetrics: artefacts ## PhpMetrics (http://www.phpmetrics.org)
$(QA) phpmetrics --report-html=$(LOCAL_ARTEFACTS)/phpmetrics src

php-cs-fixer: ## php-cs-fixer (http://cs.sensiolabs.org)
$(QA) php-cs-fixer fix --dry-run --using-cache=no --verbose --diff

apply-php-cs-fixer: ## apply php-cs-fixer fixes on new files
$(eval NEW_FILES := $(shell git diff $(REF_BRANCH) --name-only| egrep '.php$$'))
$(QA) sh -c 'for filename in $(NEW_FILES); do if [ -f $$filename ]; then echo "fixing $$filename"; php-cs-fixer fix -q --using-cache=no $$filename; fi; done;'

phpstan: ## PHP Static Analysis Tool (https://github.com/phpstan/phpstan)
$(QA) phpstan analyse -l 0 -c .phpstan.neon --memory-limit=-1 src

twigcs: ## twigcs (https://github.com/friendsoftwig/twigcs)
$(eval NEW_FILES := $(shell git diff $(REF_BRANCH) --name-only| egrep '.twig$$'))
$(QA) sh -c 'for filename in $(NEW_FILES); do if [ -f $$filename ]; then echo "analysing $$filename"; twigcs lint --severity=error $$filename; fi; done;'

deploy:
printf "\033[32m Deploy to Server \033[0m\n"

.PHONY: assets
9 changes: 9 additions & 0 deletions assets/core.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const $ = require('jquery');
global.$ = global.jQuery = $;
//var modernizr = require("modernizr");

import './js/materialize.js';
import './js/jquery.easing.min.js';
import './js/jquery.mCustomScrollbar.js';
import './js/owl.carousel.min.js';
import './js/scripts.js';
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/References/Reference_Logo_SF.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/Skills/Skill_Logo_cicd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/Skills/Skill_Logo_sf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions assets/js/jquery-2.1.1.min.js

This file was deleted.

221 changes: 0 additions & 221 deletions assets/js/jquery.mousewheel.js

This file was deleted.

Loading

0 comments on commit e227d73

Please sign in to comment.