Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.
/ yml-helper Public archive

NPM package for parsing Bitrise apps' bitrise.yml

Notifications You must be signed in to change notification settings

bitrise-io/yml-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yml-helper

NPM package for parsing Bitrise apps' bitrise.yml

Example code

import { StepSourceService, App } from 'yml-helper';

const bitriseYml = `
format_version: '6'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: other
trigger_map: []
workflows:
  workflow-test:
    steps:
    - script@1.1.5: {}
    - script@1.1.4: {}
  workflow-test-old:
    steps:
    - script@1.1.3: {}
    - script@1.1.2: {}
`;

const stepSourceService = new StepSourceService();
stepSourceService.loadDefaultLibrary().then(() => {
  const app = new App(bitriseYml, stepSourceService);

  app.workflows.forEach(workflow => {
    workflow.steps.forEach(step => {
      console.log(stepSourceService.isStepAtLeastOnVersion(step, '1.1.4'));
    });
  });
});

About

NPM package for parsing Bitrise apps' bitrise.yml

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published