Skip to content

Commit

Permalink
From obsidian vault backup: 2023-02-20 19:16:34
Browse files Browse the repository at this point in the history
Affected files:
.obsidian/plugins/obsidian-activity-history/data.json
docs/projects/projects/7.md
docs/projects/projects/8.md
  • Loading branch information
cubxxw committed Feb 20, 2023
1 parent ac75827 commit 2d81e14
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .obsidian/plugins/obsidian-activity-history/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{
"path": "/",
"date": "2023-02-20",
"size": 22135797
"size": 22137003
}
],
"activityHistory": [
Expand Down Expand Up @@ -70,7 +70,7 @@
},
{
"date": "2023-02-20",
"value": 177891
"value": 179099
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion docs/projects/projects/7.md
Original file line number Diff line number Diff line change
Expand Up @@ -1476,7 +1476,7 @@ make[1]: Entering directory `/home/colin/workspace/golang/src/github.com/marmote
make[1]: Leaving directory `/home/colin/workspace/golang/src/github.com/marmotedu/iam'
```

如果觉得 Entering directory 这类信息很烦人,可以通过设置 MAKEFLAGS += --no-print-directory 来禁止 Makefile 打印这些信息。
如果觉得 Entering directory 这类信息很烦人,可以通过设置 `MAKEFLAGS += --no-print-directory` 来禁止 Makefile 打印这些信息。



Expand Down
26 changes: 25 additions & 1 deletion docs/projects/projects/8.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,35 @@
$ git checkout -b feature/helloworld develop
```

这里需要注意:新建的 branch 名要符合 Git Flow 工作流中的分支命名规则。否则,在 git commit 阶段,会因为 branch 不规范导致 commit 失败。IAM 项目的分支命令规则具体如下图所示:
⚠️ **这里需要注意**:新建的 branch 名要符合 Git Flow 工作流中的分支命名规则。否则,在 git commit 阶段,会因为 `branch` 不规范导致 `commit` 失败。IAM 项目的分支命令规则具体如下图所示:

![image-20230220095937613](http://sm.nsddd.top/sm202302200959749.png)

> IAM 项目通过 `pre-commit githooks` 来确保分支名是符合规范的。在 IAM 项目根目录下执行 `git commit` 命令,git 会自动执行`pre-commit`脚本,该脚本会检查当前 branch 的名字是否符合规范。
这里还有一个地方需要你注意:git 不会提交 `.git/hooks` 目录下的 `githooks` 脚本,所以我们需要通过以下手段,确保开发者 clone 仓库之后,仍然能安装我们指定的 githooks 脚本到 `.git/hooks` 目录:

```bash
# Copy githook scripts when execute makefile
COPY_GITHOOK:=$(shell cp -f githooks/* .git/hooks/)
```

上述代码放在`scripts/make-rules/common.mk`文件中,每次执行 make 命令时都会执行,可以确保 `githooks` 都安装到 `.git/hooks`目录下。



**第二步,在 `feature/helloworld` 分支中,完成 `helloworld` 命令的添加。**

首先,通过 iamctl new helloworld 命令创建 helloworld 命令模板:

```bash
$ iamctl new helloworld -d internal/iamctl/cmd/helloworld
Command file generated: internal/iamctl/cmd/helloworld/helloworld.go
```



接着,编辑`internal/iamctl/cmd/cmd.go`文件,在源码文件中添加`helloworld.NewCmdHelloworld(f, ioStreams`),,加载 helloworld 命令。这里将 helloworld 命令设置为Troubleshooting and Debugging Commands命令分组:



Expand Down

3 comments on commit 2d81e14

@vercel
Copy link

@vercel vercel bot commented on 2d81e14 Feb 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

awesome-go-nglg – ./dist

awesome-go-nglg-git-master-cub.vercel.app
awesome-go-nglg.vercel.app
awesome-go-nglg-cub.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 2d81e14 Feb 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

awesome-go – ./dist

awesome-go-git-master-cub.vercel.app
awesome-go-orcin.vercel.app
awesome-go-cub.vercel.app
go.nsddd.top

@cubxxw
Copy link
Owner Author

@cubxxw cubxxw commented on 2d81e14 Feb 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by review

Please sign in to comment.