Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

READY: Add missed action file, update code to run from utility #102

Merged
merged 1 commit into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions step/ActionWrite.s
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;
8 changes: 2 additions & 6 deletions will.yml
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,6 @@ step:
- proto
npm.install:
shell: npm install --production
npm.install.dev:
shell: npm install wFiles
clean.out:
inherit: files.delete
filePath: '{path::out.*=1}/source'
Expand Down Expand Up @@ -368,8 +366,8 @@ step:
inherit: git.push
dirPath: .
action.write:
currentPath: 'path::in'
shell: 'node {path::step}/ActionWrite.s version:{about::version} logger:3'
inherit: js.run
js: '{path::step}/ActionWrite.s'
release:
inherit: repo.release
tag: 'v{about::version}'
Expand All @@ -393,7 +391,6 @@ build:
- tag.js_action
- push
- switch.master
- npm.install.dev
- action.write
- add
- commit
Expand Down Expand Up @@ -422,7 +419,6 @@ build:
- tag.js_action
- push
- switch.master
- npm.install.dev
- action.write
- add
- commit
Expand Down