Commit 587e1793 authored by 邓晓峰's avatar 邓晓峰

feat: ci add lint checkout workflow

parent 30374c50
variables: variables:
TARGET_REPO: "F:/CIV_CI/CivWebPublish2021_CIVWeb5/CivWebPublish2021/" TARGET_REPO: "F:/CIV_CI/CivWebPublish2021_CIVWeb5/CivWebPublish2021/"
before_script: before_script:
- chcp 65001 - chcp 65001
...@@ -7,9 +7,10 @@ before_script: ...@@ -7,9 +7,10 @@ before_script:
stages: stages:
- install - install
- lint
- package - package
- push - push
install: install:
stage: install stage: install
script: script:
...@@ -25,12 +26,22 @@ install: ...@@ -25,12 +26,22 @@ install:
- $NPM_INSTALL == "true" - $NPM_INSTALL == "true"
when: manual when: manual
lint:
stage: lint
script:
- npm run lint
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
only:
- master
when: manual
package: package:
stage: package stage: package
script: script:
- echo "${CI_PROJECT_DIR}" - echo "${CI_PROJECT_DIR}"
- npm run build -- --releasepath=../CivWebPublish2021 - npm run build --releasepath=../CivWebPublish2021
cache: cache:
key: ${CI_COMMIT_REF_SLUG} key: ${CI_COMMIT_REF_SLUG}
paths: paths:
...@@ -39,7 +50,7 @@ package: ...@@ -39,7 +50,7 @@ package:
- master - master
when: manual when: manual
push: push:
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
...@@ -54,7 +65,7 @@ push: ...@@ -54,7 +65,7 @@ push:
IF ((${LASTEXITCODE} -le 8)) {cmd /c "exit /b 0"}' IF ((${LASTEXITCODE} -le 8)) {cmd /c "exit /b 0"}'
- 'git add . ; git reset HEAD Web.config CityInterface/Web.config CityWebFW/Web.config ; git commit -m "auto package CivWeb5."' - 'git add . ; git reset HEAD Web.config CityInterface/Web.config CityWebFW/Web.config ; git commit -m "auto package CivWeb5."'
#- 'git push origin map' #- 'git push origin map'
only: only:
- master - master
when: manual when: manual
...@@ -12,7 +12,7 @@ module.exports = { ...@@ -12,7 +12,7 @@ module.exports = {
'styled-components', 'styled-components',
'@babel/plugin-proposal-class-properties', '@babel/plugin-proposal-class-properties',
'@babel/plugin-syntax-dynamic-import', '@babel/plugin-syntax-dynamic-import',
['import', { libraryName: 'antd', style: true }] ['import', { libraryName: 'antd', style: true }],
], ],
env: { env: {
production: { production: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment