Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
6be20f4f
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6be20f4f
编写于
1月 04, 2019
作者:
M
Martin Aeschlimann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[seti] script to update commitHash in cgmanifest
上级
2f82209a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
32 addition
and
21 deletion
+32
-21
extensions/theme-seti/build/update-icon-theme.js
extensions/theme-seti/build/update-icon-theme.js
+29
-18
extensions/theme-seti/cgmanifest.json
extensions/theme-seti/cgmanifest.json
+2
-2
extensions/theme-seti/icons/vs-seti-icon-theme.json
extensions/theme-seti/icons/vs-seti-icon-theme.json
+1
-1
未找到文件。
extensions/theme-seti/build/update-icon-theme.js
浏览文件 @
6be20f4f
...
@@ -35,16 +35,32 @@ let nonBuiltInLanguages = { // { fileNames, extensions }
...
@@ -35,16 +35,32 @@ let nonBuiltInLanguages = { // { fileNames, extensions }
"
todo
"
:
{
fileNames
:
[
'
todo
'
]
}
"
todo
"
:
{
fileNames
:
[
'
todo
'
]
}
};
};
function
getCommitSha
(
repoId
,
repoPath
)
{
let
FROM_DISK
=
false
;
// set to true to take content from a repo checkedout next to the vscode repo
let
commitInfo
=
'
https://api.github.com/repos/
'
+
repoId
+
'
/commits?path=
'
+
repoPath
;
let
font
,
fontMappingsFile
,
fileAssociationFile
,
colorsFile
;
if
(
!
FROM_DISK
)
{
font
=
'
https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/_fonts/seti/seti.woff
'
;
fontMappingsFile
=
'
https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/_fonts/seti.less
'
;
fileAssociationFile
=
'
https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/components/icons/mapping.less
'
;
colorsFile
=
'
https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/ui-variables.less
'
;
}
else
{
font
=
'
../../../seti-ui/styles/_fonts/seti/seti.woff
'
;
fontMappingsFile
=
'
../../../seti-ui/styles/_fonts/seti.less
'
;
fileAssociationFile
=
'
../../../seti-ui/styles/components/icons/mapping.less
'
;
colorsFile
=
'
../../../seti-ui/styles/ui-variables.less
'
;
}
function
getCommitSha
(
repoId
)
{
let
commitInfo
=
'
https://api.github.com/repos/
'
+
repoId
+
'
/commits/master
'
;
return
download
(
commitInfo
).
then
(
function
(
content
)
{
return
download
(
commitInfo
).
then
(
function
(
content
)
{
try
{
try
{
let
lastCommit
=
JSON
.
parse
(
content
)
[
0
]
;
let
lastCommit
=
JSON
.
parse
(
content
);
return
Promise
.
resolve
({
return
Promise
.
resolve
({
commitSha
:
lastCommit
.
sha
,
commitSha
:
lastCommit
.
sha
,
commitDate
:
lastCommit
.
commit
.
author
.
date
commitDate
:
lastCommit
.
commit
.
author
.
date
});
});
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
error
(
'
Failed parsing
'
+
content
);
return
Promise
.
resolve
(
null
);
return
Promise
.
resolve
(
null
);
}
}
},
function
()
{
},
function
()
{
...
@@ -189,21 +205,10 @@ function getLanguageMappings() {
...
@@ -189,21 +205,10 @@ function getLanguageMappings() {
return
langMappings
;
return
langMappings
;
}
}
//let font = 'https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/_fonts/seti/seti.woff';
let
font
=
'
../../../seti-ui/styles/_fonts/seti/seti.woff
'
;
exports
.
copyFont
=
function
()
{
exports
.
copyFont
=
function
()
{
return
downloadBinary
(
font
,
'
./icons/seti.woff
'
);
return
downloadBinary
(
font
,
'
./icons/seti.woff
'
);
};
};
//let fontMappings = 'https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/_fonts/seti.less';
//let mappings = 'https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/components/icons/mapping.less';
//let colors = 'https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/ui-variables.less';
let
fontMappingsFile
=
'
../../../seti-ui/styles/_fonts/seti.less
'
;
let
fileAssociationFile
=
'
../../../seti-ui/styles/components/icons/mapping.less
'
;
let
colorsFile
=
'
../../../seti-ui/styles/ui-variables.less
'
;
exports
.
update
=
function
()
{
exports
.
update
=
function
()
{
console
.
log
(
'
Reading from
'
+
fontMappingsFile
);
console
.
log
(
'
Reading from
'
+
fontMappingsFile
);
...
@@ -358,12 +363,18 @@ exports.update = function () {
...
@@ -358,12 +363,18 @@ exports.update = function () {
while
((
match
=
regex3
.
exec
(
content
))
!==
null
)
{
while
((
match
=
regex3
.
exec
(
content
))
!==
null
)
{
colorId2Value
[
match
[
1
]]
=
match
[
2
];
colorId2Value
[
match
[
1
]]
=
match
[
2
];
}
}
return
getCommitSha
(
'
jesseweed/seti-ui
'
,
'
styles/_fonts/seti.less
'
).
then
(
function
(
info
)
{
return
getCommitSha
(
'
jesseweed/seti-ui
'
).
then
(
function
(
info
)
{
try
{
try
{
writeFileIconContent
(
info
);
writeFileIconContent
(
info
);
if
(
info
)
{
console
.
log
(
'
Updated to jesseweed/seti-ui@
'
+
info
.
commitSha
.
substr
(
0
,
7
)
+
'
(
'
+
info
.
commitDate
.
substr
(
0
,
10
)
+
'
)
'
);
let
cgmanifestPath
=
'
./cgmanifest.json
'
;
}
let
cgmanifest
=
fs
.
readFileSync
(
cgmanifestPath
).
toString
();
let
cgmanifestContent
=
JSON
.
parse
(
cgmanifest
);
cgmanifestContent
[
'
registrations
'
][
0
][
'
component
'
][
'
git
'
][
'
commitHash
'
]
=
info
.
commitSha
;
fs
.
writeFileSync
(
cgmanifestPath
,
JSON
.
stringify
(
cgmanifestContent
,
null
,
'
\t
'
));
console
.
log
(
'
updated
'
+
cgmanifestPath
);
console
.
log
(
'
Updated to jesseweed/seti-ui@
'
+
info
.
commitSha
.
substr
(
0
,
7
)
+
'
(
'
+
info
.
commitDate
.
substr
(
0
,
10
)
+
'
)
'
);
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
error
(
e
);
console
.
error
(
e
);
...
...
extensions/theme-seti/cgmanifest.json
浏览文件 @
6be20f4f
...
@@ -6,11 +6,11 @@
...
@@ -6,11 +6,11 @@
"git"
:
{
"git"
:
{
"name"
:
"seti-ui"
,
"name"
:
"seti-ui"
,
"repositoryUrl"
:
"https://github.com/jesseweed/seti-ui"
,
"repositoryUrl"
:
"https://github.com/jesseweed/seti-ui"
,
"commitHash"
:
"
0b576faae405d3cd8df6ac1a397f287aa6d8b3fe
"
"commitHash"
:
"
89175d7f9e0c70cd325b80a18a3c77fc8eb7c798
"
}
}
},
},
"version"
:
"0.1.0"
"version"
:
"0.1.0"
}
}
],
],
"version"
:
1
"version"
:
1
}
}
\ No newline at end of file
extensions/theme-seti/icons/vs-seti-icon-theme.json
浏览文件 @
6be20f4f
...
@@ -1820,5 +1820,5 @@
...
@@ -1820,5 +1820,5 @@
"npm-debug.log"
:
"_npm_ignored_light"
"npm-debug.log"
:
"_npm_ignored_light"
}
}
},
},
"version"
:
"https://github.com/jesseweed/seti-ui/commit/
7714a720646300bb8f6d1690752cd71f50991414
"
"version"
:
"https://github.com/jesseweed/seti-ui/commit/
89175d7f9e0c70cd325b80a18a3c77fc8eb7c798
"
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录