Commit graph

55 commits

Author SHA1 Message Date
nodiscc
6d16b6c8a8
tools/Makefile: update trivy to v0.43.1
è https://github.com/aquasecurity/trivy/releases/tag/v0.43.1
2023-07-08 21:18:37 +02:00
nodiscc
3b5923b7e1
tools/CI: scan repository with trivy security scanner (yarn.lock, composer.lock)
- run scan on each push/pull request update
- can be run locally using make test_trivy_repo
- exit with error code 0/success when vulnerabilities are found,  as not to make the workflow fail, a separate periodic run that exits with code 1 should be added in parallel
- update trivy to v0.43.0
- https://github.com/aquasecurity/trivy/releases/tag/v0.43.0
- also consider TRIVY_EXIT_CODE when running trivy on the latest docker image
- ref. https://github.com/shaarli/Shaarli/issues/1531
2023-06-30 23:56:09 +02:00
nodiscc
d48e06f438
run trivy vulnerability scanner on the 'latest' docker image
- run trivy from makefile so that it can be run both locally and through github actions
- usage: make test_trivy TRIVY_TARGET_DOCKER_IMAGE=regist.ry/user/image:tag
- tested by downgrading the base image to alpine 3.15.7 and verifying that vulnerabilities are reported (https://github.com/nodiscc/Shaarli/actions/runs/4860040980/jobs/8663400103)
- TEMP/TESTING only push image to ghcr.io, run trivy on trivy branch/docker tag as well as master
- ref. https://github.com/shaarli/Shaarli/issues/1531
2023-05-02 12:24:50 +02:00
ArthurHoaro
6624f00c05
Makefile: Use GNU tar if available (#1957) 2023-03-18 14:03:34 -04:00
ArthurHoaro
ebe9417981
Rename authors makefile target to avoid conflicts with filename (#1955) 2023-03-18 13:19:37 -04:00
ArthurHoaro
a265865124 Fix translate Makefile target
The syntax was invalid and this target was not actually doing anything
(it probably worked at some point in another context).

This change make sure that the .mo files are properly generated, even in
unit tests context and fixes #1893
2022-10-08 08:02:02 -04:00
nodiscc
e0a9d66d99
tests/makefile: rewrite translate target to be compatible with busybox find
- https://manpages.debian.org/bullseye/busybox-static/busybox.1.en.html#find
2022-09-24 17:55:15 +02:00
nodiscc
803f6a7e36 build: use the yarnpkg command instead of yarn
- yarnpkg is always aliased to the proper yarn binary on all distributions
- yarn command does not always point to yarn package managed (Debian)
2022-04-06 19:26:01 +02:00
ArthurHoaro
e09bb93e18 Coding style: switch PHPCS to PSR12
Also temporarily ignore test code (one step at a time).

Reference: https://www.php-fig.org/psr/psr-12/

Related to #95
2020-11-08 14:09:15 +01:00
ArthurHoaro
4cf3564d28 Add a setting to retrieve bookmark metadata asynchrounously
- There is a new standalone script (metadata.js) which requests
    a new controller to get bookmark metadata and fill the form async
  - This feature is enabled with the new setting: general.enable_async_metadata
    (enabled by default)
  - general.retrieve_description is now enabled by default
  - A small rotating loader animation has a been added to bookmark inputs
    when metadata is being retrieved (default template)
  - Custom JS htmlentities has been removed and  mathiasbynens/he
    library is used instead

Fixes #1563
2020-10-15 09:08:46 +02:00
ArthurHoaro
769a28833b
Merge pull request #1566 from nodiscc/makefile-composer-install
doc/Makefile: remove references to composer update
2020-09-30 11:12:17 +02:00
nodiscc
0f686afe11 doc/Makefile: remove references to composer update
- add make composer_dependencies_dev Makefile target and use this instead
- fix composer initial installation procedure
- fix php-xdebug install instructions
2020-09-24 21:51:28 +02:00
nodiscc
6ec24b3605 Makefile: remove static_analysis_summary from all: target
static_analysis_summary was removed in 37c9c6b#diff-b67911656ef5d18c4ae36cb6741b7965 but not from the all: target dependencies. Therefore running make all always fails.
fixes https://github.com/shaarli/Shaarli/issues/1459
2020-09-24 21:45:17 +02:00
ArthurHoaro
96746d7165 Upgrade front end dependencies
Mostly in order to get rid of deprecated deps, and upgrade vulnerable ones.

  - Upgrade webpack from 3.x to 4.x
  - Moved babel package to main repo
  - Replaced deprecated extract-text-webpack-plugin with extract-text-webpack-plugin
  - Replaced deprecated babel-minify-webpack-plugin with terser-webpack-plugin
  - Replaced deprecated node-sass with (dart) sass package
  - Replaced deprecated sass-lint with stylelint (the rules might be a bit different

Related to #1531: trivy doesn't raise any more issue
2020-09-22 17:51:42 +02:00
Brendan M. Sleight
52964ec873
Update Makefile
Solve make htmldoc error on python3 ubuntu
2020-02-05 20:07:47 +00:00
nodiscc
dd452c5691 fix directory creation in makefile
the syntax {doc,venor} is only supported in bash and make uses /bin/sh as default shell
2020-01-19 12:35:19 +01:00
ArthurHoaro
e26e2060f5 Add and update unit test for the new system (Bookmark + Service)
See #1307
2020-01-18 09:56:32 +01:00
VirtualTam
9eb6055abb doc: remove Doxygen configuration
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2019-01-18 22:44:21 +01:00
VirtualTam
7be2a2d5f4 doc: add Make target to run phpDocumentor with Docker
This target provides a convenient way for running phpDocumentor without
cluttering the system's configuration with PHP extensions, nor the
Composer dependencies.

See:
- https://hub.docker.com/r/phpdoc/phpdoc/dockerfile
- https://github.com/phpDocumentor/phpDocumentor2#via-docker

An alternative is to download the PHAR and run it locally:
- https://docs.phpdoc.org/getting-started/installing.html#phar

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2019-01-18 22:40:15 +01:00
VirtualTam
04ec8fedd9 lint: setup PHPCS for PSR-1 and PSR-2
Relates to https://github.com/shaarli/Shaarli/issues/95

See:
- https://github.com/squizlabs/PHP_CodeSniffer
- https://github.com/squizlabs/PHP_CodeSniffer/blob/master/phpcs.xml.dist
- https://www.php-fig.org/psr/psr-1/
- https://www.php-fig.org/psr/psr-2/

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2018-12-02 22:39:16 +01:00
VirtualTam
37c9c6b4e6 lint: remove unused tools
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2018-12-02 22:39:16 +01:00
ArthurHoaro
a136a427ae Include assets in the release_archive Makefile target 2018-07-28 19:52:47 +02:00
VirtualTam
fd2e8fad79 Let MkDocs clean previously generated HTML pages
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2018-06-26 22:20:57 +02:00
ArthurHoaro
03b483aa45 Add SASSLint makefile target, and run it in CI
Also move ESLint and SASSLint config files to a dedicated .dev folder
2018-05-10 13:29:47 +02:00
ArthurHoaro
47978e8772 Webpack / Configure webpack, ESLint, Travis, Makefile, npm/yarn and git 2018-03-28 19:04:40 +02:00
VirtualTam
ba2cff1549 Doxygen: ignore data/, simplify Make target
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2018-02-23 00:37:03 +01:00
nodiscc
76c3a4dbed documentation cleanup
* In preparation of #930 work
 * Remove/reorder duplicate documentation from Makefile/Unit-tests.md/Download-and-Installation.md (composer information is now in Unit-tests.md)
 * Installation using git: add composer requirement to all git installation procedures, add python3-virtualenv requirement
 * Styling (horizontal rulers, spacing, descriptive headers)
2017-11-18 16:22:43 +01:00
ArthurHoaro
d637976329 Use makefile target to generate MO file and remove it from git 2017-10-22 12:56:55 +02:00
ArthurHoaro
12266213d0 Shaarli's translation
* translation system and unit tests
 * Translations everywhere

Dont use translation merge

It is not available with PHP builtin gettext, so it would have lead to inconsistency.
2017-10-22 12:55:03 +02:00
VirtualTam
1a216faecb docker: switch to Alpine Linux for the master image
Relates to https://github.com/shaarli/Shaarli/issues/843

Changed:
- switch base image from Debian:Jessie to Alpine:3.6
- switch to PHP 7.1
- switch from supervisord to s6 to manage services

See:
- https://alpinelinux.org/
- https://wiki.alpinelinux.org/wiki/Nginx_with_PHP
- http://www.skarnet.org/software/s6/
  - http://www.skarnet.org/software/s6/s6-svscan.html
  - http://www.skarnet.org/software/s6/s6-svc.html
  - http://www.skarnet.org/software/s6/s6-svstat.html

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2017-10-03 19:47:01 +02:00
VirtualTam
d691604080 docker: add alpine,debian,ubuntu test images
Relates to https://github.com/shaarli/Shaarli/issues/843

Added:
- Makefile target to run commands in a Docker test context
- Docker images to run Shaarli test suites:
  - Alpine 3.6
  - Debian 8
  - Debian 9
  - Ubuntu 16.04
- Documentation

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2017-09-18 21:13:59 +02:00
VirtualTam
dc37a482ed Documentation+Makefile: update AUTHORS generation
Fixes https://github.com/shaarli/Shaarli/issues/935

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2017-08-29 19:46:23 +02:00
VirtualTam
29712e905b documentation: include generated HTML in release archives
Closes https://github.com/shaarli/Shaarli/issues/908
Relates to https://github.com/shaarli/Shaarli/pull/772

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2017-08-02 14:48:41 +02:00
VirtualTam
eaed9ce88e fix: use pinned dependency revisions when generating release archives
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2017-08-02 14:44:02 +02:00
nodiscc
8bf94136e1 makefile: remove [[link]] -> [link](url) conversion logic
all links in documentation have been converted to standard markdown link syntax
2017-07-04 21:30:50 +02:00
nodiscc
f47aa40c12 makefile: remove obsolete 'doc' target
official documentation can now be found in doc/md/
2017-07-04 21:26:27 +02:00
nodiscc
53ed6d7d1e Generate HTML documentation using MkDocs (WIP)
MkDocs is a static site generator geared towards building project documentation.
Documentation source files are written in Markdown, and configured with a single YAML file.

 * http://www.mkdocs.org/
 * http://www.mkdocs.org/user-guide/configuration/

Ref. #312

* remove pandoc-generated HTML documentation
* move markdown doc to doc/md/,
* mkdocs.yml:
  * generate HTML doc in doc/html
  * add pages TOC/ordering
  * use index.md as index page
* Makefile: remove execute permissions from generated files
* Makefile: rewrite htmlpages GFM to markdown conversion using sed:
   awk expression aslo matched '][' which causes invalid output on complex links with images or code blocks
* Add mkdocs.yml to .gitattributes, exclude this file from release archives
* Makefile: rename: htmldoc -> doc_html target
* run make doc: pull latest markdown documentation from wiki
* run make htmlpages: update html documentation
2017-06-18 00:19:49 +02:00
ArthurHoaro
6c7d686454 Run languages tests using PHPUnit test suites 2017-03-06 21:11:18 +01:00
VirtualTam
3ee5c69777 Add an AUTHORS file, simplify COPYING, bump year to 2017
Added:
- AUTHORS file listing Shaarli contributors
- mailmap information to group a Git author's different aliases
- Makefile target to list contributors from Git commit data

Changed:
- Simplify COPYING by using a single "Shaarli Community" entry
- Bump year to 2017

See:
- man git-shortlog
- https://www.kernel.org/pub/software/scm/git/docs/git-shortlog.html#_mapping_authors

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2017-01-07 14:49:39 +01:00
VirtualTam
ca0ed5ca42 Update release archive generation
Relates to https://github.com/shaarli/Shaarli/issues/607
Relates to https://github.com/shaarli/Shaarli/pull/608

Modifications:
- match the arborescence of the archives provided by GitHub
- generate compressed tarballs

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2016-10-19 19:50:12 +02:00
VirtualTam
559315ba0a Makefile: generate release archives including 3rd-party libraries
Relates to #607

Archive creation process (tar, zip):
- let Composer resolve functional (no-dev) dependencies
- call git-archive to generate a release archive
- include 3rd-party dependencies to the generated archive

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2016-07-25 23:54:13 +02:00
ArthurHoaro
2d97aa7781 Remove Delicious in project description in comments 2016-07-23 14:13:56 +02:00
VirtualTam
fc17813bd1 tests: add a make target to check file permissions
Additions:
- [makefile] check versioned files are not executable
- [travis]   call the new make target

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2016-01-17 21:02:24 +01:00
VirtualTam
4bf35ba56b application: refactor version checks, move to ApplicationUtils
Relates to #372

Modifications:
 - move checkUpdate() to ApplicationUtils
 - reduce file I/O operations during version checks
 - apply coding conventions
 - add test coverage

Tools:
 - create a sandbox directory for tests

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2015-11-26 23:19:37 +01:00
VirtualTam
05af6f5325 Add a target to generate Doxygen documentation
Relates to #95

Customizations for PHP/Shaarli:
 - add project information
 - index PHP files
 - index global functions
 - exclude directories

Usage
 $ make doxygen
 $ firefox doxygen/index.html &

Notes
 - classes can be found under "Data Structures"
 - global functions can be found under "Files > Globals > Functions"

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2015-11-22 20:35:00 +01:00
ArthurHoaro
a52e843593 Add plugins folder to test analysis 2015-11-07 15:27:22 +01:00
VirtualTam
992af0b9d7 Doc: sync from Wiki, generate HTML
Closes #291
Fixes #227

Modifications
 - HTML content: match the new Wiki structure
 - Makefile
   - generate a custom HTML sidebar
   - include the sidebar on all pages
   - infer and prepend page titles
   - handle relative links
   - add title metadata, e.g. Shaarli - <Page Name>

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2015-08-04 16:02:21 +02:00
VirtualTam
96db105e4c Merge pull request #276 from virtualtam/tools/phpcs
Add a generic rule to run PHPCS against different coding standards
2015-07-31 16:08:32 +02:00
VirtualTam
d0ce99e59e Makefile: do not call clean before test
Fixes #288

Modifications:
 - call `make clean` explicitely to clean the workspace
 - add `make clean` to Travis instructions

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2015-07-18 13:43:19 +02:00
VirtualTam
3e25f245f9 Makefile: add a generic rule to run PHPCS against different coding standards
Relates to #95

Usage
 - list available standards
   $ ./vendor/bin/phpcs -i
 - run PHPCS against a given standard
   $ make PHPCS_<standard>

Examples
 $ make PHPCS_PSR1
 $ make PHPCS_Zend

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2015-07-12 23:04:43 +02:00