当前位置: 首页 > news >正文

汕头自助建站模板绚丽网站

汕头自助建站模板,绚丽网站,天津平台网站建设设计,大沥南庄网站建设git 提交代码&#xff0c;推送代码&#xff0c;可以通过在 .git/hooks 目录中的 bash 脚本来做一定的验证工作。 本例使用插件 maven-antrun-plugin 自动输出脚本至 .git/hooks 目录中&#xff0c;在 pom.xml 中的使用示例如下&#xff1a; <plugin><groupId>org.…

git 提交代码,推送代码,可以通过在 .git/hooks 目录中的 bash 脚本来做一定的验证工作。

本例使用插件 maven-antrun-plugin 自动输出脚本至 .git/hooks 目录中,在 pom.xml 中的使用示例如下:

        <plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-antrun-plugin</artifactId><executions><execution><phase>generate-sources</phase><goals><goal>run</goal></goals><configuration><tasks><!-- 生成commit-msg文件 --><echo file="${basedir}/.git/hooks/commit-msg"message="#!/usr/bin/env bash${line.separator}${line.separator}"/><echo file="${basedir}/.git/hooks/commit-msg" append="true"message="# Color codes${line.separator}red='\033[0;31m'${line.separator}yellow='\033[0;33m'${line.separator}blue='\033[0;34m'${line.separator}NC='\033[0m' # No colors"/><echo file="${basedir}/.git/hooks/commit-msg" append="true"message="${line.separator}${line.separator}"/><echo file="${basedir}/.git/hooks/commit-msg" append="true"message="# Regex &amp; Usage${line.separator}commit_regex=&quot;^(\[[A-Za-z]+\-[0-9]+\]|merge|Merge)\s&quot;${line.separator}error_message=&quot;Aborting commit. Commit message must start with ${yellow} 开发任务编号&quot;${line.separator}usage=&quot;开发任务编号 Commit Message. \n${blue}示例: [TASK-101] 完成A功能开发&quot;"/><echo file="${basedir}/.git/hooks/commit-msg" append="true"message="${line.separator}${line.separator}"/><echo file="${basedir}/.git/hooks/commit-msg" append="true"message="if ! grep -qE &quot;$commit_regex&quot; &quot;$1&quot;; then${line.separator}"/><echo file="${basedir}/.git/hooks/commit-msg" append="true"message="  printf &quot;${red}$error_message\n&quot;${line.separator}"/><echo file="${basedir}/.git/hooks/commit-msg" append="true"message="  printf &quot;${yellow}Commit Regex: ${NC}${commit_regex}\n&quot;${line.separator}"/><echo file="${basedir}/.git/hooks/commit-msg" append="true"message="  printf &quot;${red}Usage: ${NC}${usage}\n&quot;${line.separator}"/><echo file="${basedir}/.git/hooks/commit-msg" append="true"message="  exit 1${line.separator}fi"/><!-- 生成pre-push文件 --><echo file="${basedir}/.git/hooks/pre-push"message="#!/usr/bin/env bash${line.separator}${line.separator}"/><echo file="${basedir}/.git/hooks/pre-push" append="true"message="# Color codes${line.separator}red='\033[0;31m'${line.separator}yellow='\033[0;33m'"/><echo file="${basedir}/.git/hooks/pre-push" append="true"message="${line.separator}${line.separator}"/><echo file="${basedir}/.git/hooks/pre-push" append="true"message="command=&quot;./mvnw.cmd clean test&quot;${line.separator}${command}"/><echo file="${basedir}/.git/hooks/pre-push" append="true"message="${line.separator}${line.separator}"/><echo file="${basedir}/.git/hooks/pre-push" append="true"message="if ! [ $? -eq 0 ]; then${line.separator}"/><echo file="${basedir}/.git/hooks/pre-push" append="true"message="  printf &quot;${red}Make sure successfully execute command: ${yellow}$command${red}.&quot;${line.separator}"/><echo file="${basedir}/.git/hooks/pre-push" append="true"message="  exit 1${line.separator}fi"/><!-- 设置权限 --><chmod dir="${basedir}/.git/hooks" perm="755" includes="**/*"/></tasks></configuration></execution></executions></plugin>

插件会自动输出 commit-msgpre-push 两个脚本文件


(END)

http://www.yayakq.cn/news/499908/

相关文章:

  • 网站建设外包给外企网站开发的著作权和版权
  • 网站设计时间计算机软件工程师证怎么考
  • 网站建设平台哪个好seo学习论坛
  • 找别人做网站交货时应该注意什么亚洲和欧洲
  • 网站代理网址ppt素材
  • 茂名专业做网站wordpress 自定义字段
  • 广州物流网站开发做军事网站的项目背景图片
  • 建设银行住房公积金卡网站企业网站建设营销
  • 如何做网站企划案怎么样查询建设网站
  • 知名自适应网站建设哪家好怎么不花钱建网站
  • 怎么制作自己的网站上海网络营销
  • 取消网站的通知书企业网站页面图片
  • 郑州400建站网站建设网站建设自查自评报告
  • 百合网网站建设与策划虚拟主机可建站1个是不是只能放一个网站
  • 2018爱情动做网站手机网站建设中心
  • 网站如何留言龙之向导外贸官方网站
  • 属于网站建设过程规划网站开发的可行性研究报告
  • 如何建设一个文件分享网站苏州诶茵诶公司网站
  • 上海营销型网站制作中国农业建设信息网站
  • 朔州网站建设收费多少东莞网站推广需要多少钱
  • 影视会员代理平台网站门户网站建设的平台搭建
  • 兰州兼职做网站找合伙人的网站做淘宝
  • 哪里的网站建设好找人做一下网站大概多少钱
  • c 购物网站开发流程wordpress 会员分销
  • 互联网营销 网站 推荐公司电商网站开发合同
  • 自己给别人做网站挣钱吗wordpress 导入html
  • 便宜网站建设公司哪家好如何做棋牌网站
  • 企业网站建设hnktwl南昌seo报价
  • 大连网站建设介绍江苏广宇建设集团有限公司网站
  • 网站开发和运行 法律开发微信小程序多少钱