标签: fileupdate

Git显示过去2天内更改的文件

如何获得包含过去2天内更改的所有文件的列表?我知道

git log --name-status --since="2 days ago" 
Run Code Online (Sandbox Code Playgroud)

但这会显示我的ID,日期和提交消息.我只需要更改的文件名列表.

用git可能吗?

git logging file fileupdate git-log

60
推荐指数
2
解决办法
3万
查看次数

GitHub API文件更新:"未找到"

我试图通过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)

api file-upload github fileupdate

3
推荐指数
1
解决办法
1508
查看次数

使用MSBUILD任务更新web.config

我正在使用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

1
推荐指数
1
解决办法
1665
查看次数