Skip to content

Commit 38772b0

Browse files
authored
Merge pull request #71 from leonhartX/fix-appscript-color-conflict
change filename selector
2 parents 54a9c0d + 48f3095 commit 38772b0

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "3.3.5",
2+
"version": "3.3.6",
33
"manifest_version": 2,
44
"default_locale": "en",
55
"name": "__MSG_appName__",

src/gas-hub.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,11 +288,11 @@ function prepareCode() {
288288
return Promise.all([gas.getGasCode(), scm.getCode()])
289289
.then((data) => {
290290
const re = new RegExp(`\\${context.config.filetype}$`);
291-
const files = $('.item').toArray().reduce((hash, e) => {
292-
if (context.config.manifestEnabled && e.innerText.trim() === 'appsscript.json') {
291+
const files = $('.item > .gwt-Label').toArray().reduce((hash, e) => {
292+
if (context.config.manifestEnabled && e.title === 'appsscript.json') {
293293
hash['appsscript'] = 'appsscript.json';
294294
}
295-
const match = e.innerText.trim().match(/(.*?)\.(gs|html)$/);
295+
const match = e.title.match(/(.*?)\.(gs|html)$/);
296296
if (!match || !match[1] || !match[2]) return hash;
297297
hash[match[1]] = match[0];
298298
return hash;

src/scm/bitbucket.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class Bitbucket {
8282
const files = changed.filter(f => code.gas[f]).map(f => {
8383
return { name: f.replace(/\.gs$/, context.config.filetype), content: code.gas[f] }
8484
});
85-
const deleteFiles = changed.filter(f => !code.gas[f]);
85+
const deleteFiles = changed.filter(f => !code.gas[f]).forEach((f, i) => changed[i] = f.replace(/\.gs$/, context.config.filetype));
8686
const comment = $('#commit-comment').val();
8787

8888
this.commitFiles(context.repo.fullName, context.branch, null, files, deleteFiles, comment)

src/scm/github.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class Github {
4343
return {file: file.replace(/\.gs$/, context.config.filetype), blob: response};
4444
})
4545
});
46+
changed.filter(f => !code.gas[f]).forEach((f, i) => changed[i] = f.replace(/\.gs$/, context.config.filetype));
4647
if (changed.length === 0) {
4748
showAlert('Nothing to do', LEVEL_WARN);
4849
return;

0 commit comments

Comments
 (0)