Skip to content

Commit 2e9ba23

Browse files
committed
Lowered actions/checkout to 6.0.1 til actions/checkout#2365 fixed ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/utils/bump]
1 parent 6cc1829 commit 2e9ba23

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

utils/bump/chatbots.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
// Import BUMP UTILS
3838
let bump
39-
if (config.devMode) // bypass cache for latest bump-utils.mjs
39+
if (app.config.devMode) // bypass cache for latest bump-utils.mjs
4040
bump = await import('./bump-utils.mjs')
4141
else { // import remote bump-utils.min.mjs updated every ~12h
4242
fs.mkdirSync(path.dirname(cachePaths.bumpUtils), { recursive: true })
@@ -46,9 +46,9 @@
4646
}
4747

4848
// COLLECT chatbot userscripts
49-
bump.log.working(`\n${ config.cacheMode ? 'Collecting' : 'Searching for' } chatbot userscripts...\n`)
49+
bump.log.working(`\n${ app.config.cacheMode ? 'Collecting' : 'Searching for' } chatbot userscripts...\n`)
5050
let chatbotFiles = []
51-
if (config.cacheMode)
51+
if (app.config.cacheMode)
5252
try { // create missing cache file
5353
fs.mkdirSync(path.dirname(cachePaths.chatbotPaths), { recursive: true })
5454
const fd = fs.openSync(cachePaths.chatbotPaths,
@@ -93,20 +93,20 @@
9393
} else bump.log.success(`${filesUpdatedCnt} chatbot${pluralSuffix} bumped!`)
9494

9595
// ADD/COMMIT/PUSH bump(s)
96-
if (config.commitMsg) {
96+
if (app.config.commitMsg) {
9797
bump.log.working(`\nCommitting bump${pluralSuffix} to Git...\n`)
9898
try {
9999
execSync('git add ./*.user.js')
100-
spawnSync('git', ['commit', '-n', '-m', config.commitMsg], { stdio: 'inherit', encoding: 'utf-8' })
100+
spawnSync('git', ['commit', '-n', '-m', app.config.commitMsg], { stdio: 'inherit', encoding: 'utf-8' })
101101
console.log('') // line break
102-
if (!config.noPush) {
102+
if (!app.config.noPush) {
103103
bump.log.working('\nPulling latest changes from remote to sync local repository...\n')
104104
execSync('git pull')
105105
bump.log.working(`\nPushing bump${pluralSuffix} to Git...\n`)
106106
execSync('git push')
107107
}
108108
bump.log.success(`Success! ${filesUpdatedCnt} chatbot${pluralSuffix} updated/committed${
109-
!config.noPush ? '/pushed' : '' } to GitHub`)
109+
!app.config.noPush ? '/pushed' : '' } to GitHub`)
110110
} catch (err) { bump.log.error('Git operation failed: ' + err.message) }
111111
} else {
112112
bump.log.working(`\nNo commit message provided. Skipping git operations.`)

utils/bump/resources.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
// Import BUMP UTILS
2929
let bump
30-
if (config.devMode) // bypass cache for latest bump-utils.mjs
30+
if (app.config.devMode) // bypass cache for latest bump-utils.mjs
3131
bump = await import('./bump-utils.mjs')
3232
else { // import remote bump-utils.min.mjs updated every ~12h
3333
fs.mkdirSync(path.dirname(cachePaths.bumpUtils), { recursive: true })
@@ -44,9 +44,9 @@
4444
}
4545

4646
// Collect userscripts
47-
bump.log.working(`\n${ config.cacheMode ? 'Collecting' : 'Searching for' } userscripts...\n`)
47+
bump.log.working(`\n${ app.config.cacheMode ? 'Collecting' : 'Searching for' } userscripts...\n`)
4848
let userJSfiles = []
49-
if (config.cacheMode) {
49+
if (app.config.cacheMode) {
5050
try { // create missing cache file
5151
fs.mkdirSync(path.dirname(cachePaths.userJSpaths), { recursive: true })
5252
const fd = fs.openSync(cachePaths.userJSpaths,

0 commit comments

Comments
 (0)