Skip to content
Snippets Groups Projects
Commit a08acf86 authored by ko_oler's avatar ko_oler
Browse files

fix .gitlab-ci.yml

parent a76cfeb2
No related branches found
No related tags found
2 merge requests!2test,!1Добавлена генерация файлов для frontend в Makefile и публикацию npm-пакета
Pipeline #19059 passed with stage
in 12 seconds
......@@ -9,26 +9,26 @@ publish_npm:
- apk add --update jq
- apk add --update rsync
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes:
- clients/**/*
- config/package.json
script:
- cd ./config
- rsync -a --prune-empty-dirs ../clients ./
- |
if [[ ! -f .npmrc ]]; then
echo 'No .npmrc found! Creating one now. Please review the following link for more information: https://docs.gitlab.com/ee/user/packages/npm_registry/index.html#project-level-npm-endpoint-1'
{
echo "@perxis-js:registry=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/npm/"
echo "${CI_API_V4_URL#http*:}/packages/npm/:_authToken=\${CI_JOB_TOKEN}"
echo "${CI_API_V4_URL#http*:}/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=\${CI_JOB_TOKEN}"
} >> .npmrc
fi
- NPM_PACKAGE_NAME=$(node -p "require('./package.json').name")
- NPM_PACKAGE_CURRENT_VERSION=$(npm show ${NPM_PACKAGE_NAME} version)
- echo -E "$(jq --arg version $NPM_PACKAGE_CURRENT_VERSION '.version = $version' package.json)" > package.json
- npm version patch
- yarn pub
- NPM_PACKAGE_VERSION=$(node -p "require('./package.json').version")
- echo "Successfully published version ${NPM_PACKAGE_VERSION} of ${NPM_PACKAGE_NAME} to GitLab's NPM registry"
- rm -rf ./clients
\ No newline at end of file
- ls
# - cd ./config
# - rsync -a --prune-empty-dirs ../clients ./
# - |
# if [[ ! -f .npmrc ]]; then
# echo 'No .npmrc found! Creating one now. Please review the following link for more information: https://docs.gitlab.com/ee/user/packages/npm_registry/index.html#project-level-npm-endpoint-1'
# {
# echo "@perxis-js:registry=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/npm/"
# echo "${CI_API_V4_URL#http*:}/packages/npm/:_authToken=\${CI_JOB_TOKEN}"
# echo "${CI_API_V4_URL#http*:}/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=\${CI_JOB_TOKEN}"
# } >> .npmrc
# fi
# - NPM_PACKAGE_CURRENT_VERSION=$(npm show ${NPM_PACKAGE_NAME} version)
# - echo -E "$(jq --arg version $NPM_PACKAGE_CURRENT_VERSION '.version = $version' package.json)" > package.json
# - yarn pub
# - echo "Successfully published version ${NPM_PACKAGE_CURRENT_VERSION} of ${NPM_PACKAGE_NAME} to GitLab's NPM registry"
# - rm -rf ./clients
# - cd ..
# - rm -rf ./clients
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment