-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from dmvict/restore_step
READY: Add missed action file, update code to run from utility
- Loading branch information
Showing
2 changed files
with
36 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
function actionWrite( frame ) | ||
{ | ||
const run = frame.run; | ||
const module = run.module; | ||
const will = module.will; | ||
const fileProvider = will.fileProvider; | ||
const logger = will.transaction.logger; | ||
const opener = module.toOpener(); | ||
|
||
/* */ | ||
|
||
logger.log( `Updating willfile. Setup version "${ module.about.version }".` ); | ||
|
||
const commonPath = fileProvider.path.common( opener.openedModule.willfilesPath ); | ||
will.willfilePropertySet | ||
({ | ||
commonPath, | ||
request: '', | ||
selectorsMap: { 'about/version' : module.about.version }, | ||
}); | ||
|
||
/* */ | ||
|
||
const actionPath = fileProvider.path.join( module.dirPath, 'action.yml' ); | ||
const action = fileProvider.fileReadUnknown( actionPath ); | ||
action.runs.steps[ 0 ].uses = `Wandalen/wretry.action@v${ module.about.version }_js_action`; | ||
|
||
logger.log( `Updating action. Setup used action version to "Wandalen/wretry.action@v${ module.about.version }_js_action".` ); | ||
|
||
fileProvider.fileWrite({ filePath : actionPath, data : action, encoding : 'yaml' }); | ||
} | ||
|
||
module.exports = actionWrite; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters