npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

git-task-runner

v0.3.1

Published

Run command on specified tag/branch according to configuration file.

Downloads

20

Readme

Git Task Runner

This package was created to solve following problem: execute commands on specific points of the repository.

For example we have few branches with different features and we want to always release specific feature to the same client.

Here is how we can solve the problem with git-task-runner.

CLI example

  • install package npm install -g git-task-runner
  • create file with configuration
command: grunt release:client1;    branch:feature1;          comment: Client1 should always reseive feature1 during testing period ( since 1st May )
command: grunt release:client2;    branch:feature2;          comment: Client2 should always reseive feature2 during testing period
command: grunt release:client3 release:client4;    branch:master;          comment: Other clients should reseive latest code from master
  • run tasks git-task-runner -c path/to/config -r path/to/repo

JS example

    var gitRunner = require( 'git-task-runner' );

    var options = {
        config: 'https://raw.githubusercontent.com/c301/git-task-runner/master/test/empty.config', //path to config can be an URL
        pathToRepo: '../test-repo'
    };
    gitRunner.run(options).then(function(result) {
        //tasks executed
    });

Configuration file

Configuration file consist of lines. Each line represents task. Each task consist of few fields separated by ;. Each field consist of name of the field and value separeted by :.

Possible fields

branch

branch name to checkout before execute the command. Required if no tag specified

tag

tag name to checkout before execute the command. Required if no branch specified

comment

humman readable comment

command

command to execute. Required. CWD for each command is folder of the repository.

Example of the config


command: cat echo.file;    branch:tmp-branch1;          comment: release latest code from master for all versions, except versions listed below
command: cat echo.file;                                 comment: empty branch name, default branch name should be passed
# command: cat echo.file;                                comment: commented task
command: cat echo.file;    tag:v5.7;                    comment: we want to always release outdated version
command: cat echo.file;    branch:tmp-branch2;          comment: testing
command: cat echo.file;    branch:tmp-branch2;          comment: testing
command: cat echo.file;    branch:tmp-branch2;          comment: testing

Options

To check CLI usage try git-task-runner -h

config ( in CLI mode -c )

required. Path to configuration file (related to current CWD)

pathToRepo ( in CLI mode -r )

required. Path to repo (related to current CWD)

defaultBranchName ( in CLI mode -b )

optional. Default branch name. Will be used, if branch name omitted in config file.