# check-commit **Repository Path**: xccjh/check-commit ## Basic Information - **Project Name**: check-commit - **Description**: 检查代码是否提交入库,用来选择终止脚本继续运行 包地址: https://www.npmjs.com/package/@xccjh/check-commit - **Primary Language**: NodeJS - **License**: Not specified - **Default Branch**: master - **Homepage**: https://www.npmjs.com/package/@xccjh/check-commit - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-03-29 - **Last Updated**: 2021-07-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: npm包, 升级发版流, 版本入库检查 ## README ## 检查代码是否提交入库,用来选择终止脚本继续运行 ### 实现效果 ![实现效果](break.png) ### 安装 ``` npm i -D @xccjh/check-commit # or yarn add -D @xccjh/check-commit ``` ### 使用 - 新增checkCommit.js ```js const {checkCommitStatus} = require('@xccjh/check-commit'); checkCommitStatus(); ``` - package.json ```shell script "oss:test": "node checkCommit.js && npm run build:test && npm run uploadOssTest && npm run uploadOssTestBak", ``` 运行`npm run oss:test`如果代码没有入库提交阻断脚本继续运行