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)
This commit is contained in:
nodiscc 2022-04-06 19:26:01 +02:00
parent 1387e059eb
commit 803f6a7e36
4 changed files with 12 additions and 12 deletions

View file

@ -70,10 +70,10 @@ jobs:
node-version: '14.x'
- name: Yarn install
run: yarn install
run: yarnpkg install
- name: Verify successful frontend builds
run: yarn run build
run: yarnpkg run build
- name: JS static analysis
run: make eslint

View file

@ -20,8 +20,8 @@ RUN cd shaarli \
FROM node:12-alpine as node
COPY --from=composer /app/shaarli shaarli
RUN cd shaarli \
&& yarn install \
&& yarn run build \
&& yarnpkg install \
&& yarnpkg run build \
&& rm -rf node_modules
# Stage 4:

View file

@ -22,8 +22,8 @@ FROM arm32v6/alpine:3.10 as node
COPY --from=composer /app/shaarli /shaarli
RUN apk --update --no-cache add yarn nodejs-current python2 build-base \
&& cd /shaarli \
&& yarn install \
&& yarn run build \
&& yarnpkg install \
&& yarnpkg run build \
&& rm -rf node_modules
# Stage 4:

View file

@ -106,11 +106,11 @@ composer_dependencies: clean
### download 3rd-party frontend libraries
frontend_dependencies:
yarn install
yarnpkg install
### Build frontend dependencies
build_frontend: frontend_dependencies
yarn run build
yarnpkg run build
### generate a release tarball and include 3rd-party dependencies and translations
release_tar: composer_dependencies htmldoc translate build_frontend
@ -169,10 +169,10 @@ translate:
### Run ESLint check against Shaarli's JS files
eslint:
@yarn run eslint -c .dev/.eslintrc.js assets/vintage/js/
@yarn run eslint -c .dev/.eslintrc.js assets/default/js/
@yarn run eslint -c .dev/.eslintrc.js assets/common/js/
@yarnpkg run eslint -c .dev/.eslintrc.js assets/vintage/js/
@yarnpkg run eslint -c .dev/.eslintrc.js assets/default/js/
@yarnpkg run eslint -c .dev/.eslintrc.js assets/common/js/
### Run CSSLint check against Shaarli's SCSS files
sasslint:
@yarn run stylelint --config .dev/.stylelintrc.js 'assets/default/scss/*.scss'
@yarnpkg run stylelint --config .dev/.stylelintrc.js 'assets/default/scss/*.scss'