Skip to content

Commit 9fe509d

Browse files
committed
debug: saveState and getState for artifacts name
1 parent f4a8084 commit 9fe509d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

setup-local/dist/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,10 +1207,12 @@ class BinaryControl {
12071207
async downloadBinary() {
12081208
try {
12091209
if (this._binaryExists()) {
1210+
console.log(core.getState('jinga'));
12101211
core.info('BrowserStackLocal binary already exists in cache. Using that instead of downloading again...');
12111212
return;
12121213
}
12131214
await this._makeDirectory();
1215+
core.saveState('jinga', 'lala');
12141216
core.info('Downloading BrowserStackLocal binary...');
12151217
const downloadPath = await tc.downloadTool(this.binaryLink, path.resolve(this.binaryFolder, 'binaryZip'));
12161218
const extractedPath = await tc.extractZip(downloadPath, this.binaryFolder);
@@ -1281,6 +1283,7 @@ class BinaryControl {
12811283
* Uploads BrowserStackLocal generated logs (if the file exists for the job)
12821284
*/
12831285
async uploadLogFilesIfAny() {
1286+
core.saveState
12841287
this._generateLogFileMetadata();
12851288
if (fs.existsSync(this.logFilePath)) {
12861289
await ArtifactsManager.uploadArtifacts(

setup-local/src/binaryControl.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,12 @@ class BinaryControl {
142142
async downloadBinary() {
143143
try {
144144
if (this._binaryExists()) {
145+
console.log(core.getState('jinga'));
145146
core.info('BrowserStackLocal binary already exists in cache. Using that instead of downloading again...');
146147
return;
147148
}
148149
await this._makeDirectory();
150+
core.saveState('jinga', 'lala');
149151
core.info('Downloading BrowserStackLocal binary...');
150152
const downloadPath = await tc.downloadTool(this.binaryLink, path.resolve(this.binaryFolder, 'binaryZip'));
151153
const extractedPath = await tc.extractZip(downloadPath, this.binaryFolder);
@@ -216,6 +218,7 @@ class BinaryControl {
216218
* Uploads BrowserStackLocal generated logs (if the file exists for the job)
217219
*/
218220
async uploadLogFilesIfAny() {
221+
core.saveState
219222
this._generateLogFileMetadata();
220223
if (fs.existsSync(this.logFilePath)) {
221224
await ArtifactsManager.uploadArtifacts(

0 commit comments

Comments
 (0)