1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
#/**
# * This file was generated with TangoMan Makefile Generator
# * https://github.com/TangoMan75/makefile-generator
# *
# * Shaarli Netscape Bookmark Parser
# *
# * This library provides a decoder that is able of parsing Netscape bookmarks (as exported by common Web browsers and bookmarking services), and an encoder that is able to export data to bookmarks format.
# *
# * @version 4.0.0
# * @license MIT
# * @link https://github.com/shaarli/netscape-bookmark-parser
# */
.PHONY: help tests coverage lint lint-fix docker docker-install docker-tests uninstall
#--------------------------------------------------
# Colors
#--------------------------------------------------
PRIMARY = \033[97m
SECONDARY = \033[36m
SUCCESS = \033[32m
DANGER = \033[31m
WARNING = \033[33m
INFO = \033[95m
LIGHT = \033[47;90m
DARK = \033[40;37m
DEFAULT = \033[0m
NL = \033[0m\n
#--------------------------------------------------
# Help
#--------------------------------------------------
## Print this help
help:
@printf "${LIGHT} Shaarli Netscape Bookmark Parser ${NL}\n"
@printf "${WARNING}Description${NL}"
@printf "${PRIMARY} This library provides a decoder that is able of parsing Netscape bookmarks (as exported by common Web browsers and bookmarking services), and an encoder that is able to export data to bookmarks format.${NL}\n"
@printf "${WARNING}Usage${NL}"
@printf "${PRIMARY} make [command] `awk -F '?' '/^[ \t]+?[a-zA-Z0-9_-]+[ \t]+?\?=/{gsub(/[ \t]+/,"");printf"%s=[%s]\n",$$1,$$1}' ${MAKEFILE_LIST}|sort|uniq|tr '\n' ' '`${NL}\n"
@printf "${WARNING}Commands${NL}"
@awk '/^### /{printf"\n${PRIMARY}%s${NL}",substr($$0,5)} \
/^[a-zA-Z0-9_-]+:/{HELP="";if( match(PREV,/^## /))HELP=substr(PREV, 4); \
printf "${SUCCESS} %-8s ${PRIMARY}%s${NL}",substr($$1,0,index($$1,":")-1),HELP \
}{PREV=$$0}' ${MAKEFILE_LIST}
## Run unit tests
tests:
@printf "${INFO}./vendor/bin/phpunit tests/Unit --stop-on-failure${NL}"
@./vendor/bin/phpunit tests/Unit --stop-on-failure
## Run linter
lint:
@printf "${INFO}./vendor/bin/phpcs${NL}"
@./vendor/bin/phpcs
## Lint source with phpcs linter
lint-fix:
@printf "${INFO}./vendor/bin/phpcbf${NL}"
@./vendor/bin/phpcbf
|