如何获得包含过去2天内更改的所有文件的列表?我知道
git log --name-status --since="2 days ago"
Run Code Online (Sandbox Code Playgroud)
但这会显示我的ID,日期和提交消息.我只需要更改的文件名列表.
用git可能吗?
我试图通过API更新我的一个回购文件中的文件.
这是我得到的那个文件(效果很好):
curl -XGET 'https://git.fake.local/api/v3/repos/jsmith/repo_version/contents/version.html?ref=gh-pages'
{
"name": "version.html",
"path": "version.html",
"sha": "b1b716105590454bfc4c0247f193a04088f39c7f",
"size": 5,
"url": "https://git.fake.local/api/v3/repos/jsmith/post_version/contents/version.html?ref=gh-pages",
"html_url": "https://git.fake.local/jsmith/post_version/blob/gh-pages/version.html",
"git_url": "https://git.fake.local/api/v3/repos/jsmith/post_version/git/blobs/b1b716105590454bfc4c0247f193a04088f39c7f",
"type": "file",
"content": "aW5pdAo=\n",
"encoding": "base64",
"_links": {
...
}
}
Run Code Online (Sandbox Code Playgroud)
这是我尝试通过PUT更新该文件:
curl -XPUT 'https://git.fake.local/api/v3/repos/jsmith/repo_version/contents/version.html?ref=gh-pages' -d '{
"message": "update from api",
"committer": {
"name": "Joe Smith",
"email": "jsmith@fake.com"
},
"content": "bXkgdXBkYXRlZCBmaWxlIGNvbnRlbnRz",
"sha": "b1b716105590454bfc4c0247f193a04088f39c7f"
}'
Run Code Online (Sandbox Code Playgroud)
结果:
{
"message": "Not Found"
}
Run Code Online (Sandbox Code Playgroud) 我正在使用Web部署项目在我正在部署的网站上执行一些后期构建任务.
我想使用FileUpdate任务来更新我的web.config并将编译模式从更改debug="true"
为debug="false".
所以,从此
<compilation defaultLanguage="c#"
debug="true" />
Run Code Online (Sandbox Code Playgroud)
对此
<compilation defaultLanguage="c#"
debug="false" />
Run Code Online (Sandbox Code Playgroud)
我的FileUpdateTask看起来像这样
<FileUpdate Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU'"
Files="$(Configuration)\Web.Config"
Regex="debug=\"true\""
ReplacementText="debug=\"false\"" />
Run Code Online (Sandbox Code Playgroud)
但这完全无效,因为你无法逃避XML中的引用.
我怎么能匹配正则表达式中的调试属性并具有有效的ReplacementText值?
干杯
asp.net msbuild web-deployment-project web-config fileupdate
fileupdate ×3
api ×1
asp.net ×1
file ×1
file-upload ×1
git ×1
git-log ×1
github ×1
logging ×1
msbuild ×1
web-config ×1