Skip to content

Instantly share code, notes, and snippets.

@RomanMinkin
Forked from stevemao/np.sh
Created January 25, 2019 18:57
Show Gist options
  • Save RomanMinkin/35d6cf9f33e69a859b56f929a2bcf01d to your computer and use it in GitHub Desktop.
Save RomanMinkin/35d6cf9f33e69a859b56f929a2bcf01d to your computer and use it in GitHub Desktop.

Revisions

  1. @stevemao stevemao revised this gist Feb 2, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions np.sh
    Original file line number Diff line number Diff line change
    @@ -17,7 +17,7 @@ np() {
    bump=`conventional-recommended-bump -p angular` &&
    echo ${1:-$bump} &&
    npm --no-git-tag-version version ${1:-$bump} &>/dev/null &&
    conventional-changelog -i CHANGELOG.md -w -p ${2:-$preset} &&
    conventional-changelog -i CHANGELOG.md -s -p ${2:-$preset} &&
    git add CHANGELOG.md &&
    version=`cat package.json | json version` &&
    git commit -m"docs(CHANGELOG): $version" &&
    @@ -43,7 +43,7 @@ ap() {
    bump=`conventional-recommended-bump -p angular` &&
    echo ${1:-$bump} &&
    npm --no-git-tag-version version ${1:-$bump} &>/dev/null &&
    conventional-changelog -i CHANGELOG.md -w -p ${2:-$preset} &&
    conventional-changelog -i CHANGELOG.md -s -p ${2:-$preset} &&
    git add CHANGELOG.md &&
    version=`cat package.json | json version` &&
    git commit -m":memo: CHANGELOG for $version" &&
  2. @stevemao stevemao revised this gist Aug 15, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions np.sh
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@
    # and optional argument preset `angular`/ `jquery` ...
    # defaults to conventional-commits-detector
    np() {
    travis status &&
    travis status --no-interactive &&
    trash node_modules &>/dev/null;
    git pull --rebase &&
    npm install &&
    @@ -30,7 +30,7 @@ np() {

    # apm publish with goodies
    ap() {
    travis status &&
    travis status --no-interactive &&
    trash node_modules &>/dev/null;
    git pull --rebase &&
    npm install &&
  3. @stevemao stevemao revised this gist Aug 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion np.sh
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,7 @@ np() {
    version=`cat package.json | json version` &&
    git commit -m"docs(CHANGELOG): $version" &&
    mv -f _package.json package.json &&
    npm version ${1:-$bump} -m "chore: release %s" &&
    npm version ${1:-$bump} -m "chore(release): %s" &&
    git push --follow-tags &&
    conventional-github-releaser -p ${2:-$preset} &&
    npm publish
  4. @stevemao stevemao revised this gist Aug 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion np.sh
    Original file line number Diff line number Diff line change
    @@ -46,7 +46,7 @@ ap() {
    conventional-changelog -i CHANGELOG.md -w -p ${2:-$preset} &&
    git add CHANGELOG.md &&
    version=`cat package.json | json version` &&
    git commit -m"docs(CHANGELOG): $version" &&
    git commit -m":memo: CHANGELOG for $version" &&
    mv -f _package.json package.json &&
    apm publish ${1:-$bump} &&
    git push --follow-tags &&
  5. @stevemao stevemao revised this gist Aug 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion np.sh
    Original file line number Diff line number Diff line change
    @@ -35,7 +35,7 @@ ap() {
    git pull --rebase &&
    npm install &&
    apm install &&
    npm test &&
    npm test && # checking coding styles or non atom related tests maybe
    apm test &&
    cp package.json _package.json &&
    preset=`conventional-commits-detector` &&
  6. @stevemao stevemao revised this gist Aug 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion np.sh
    Original file line number Diff line number Diff line change
    @@ -50,5 +50,5 @@ ap() {
    mv -f _package.json package.json &&
    apm publish ${1:-$bump} &&
    git push --follow-tags &&
    conventional-github-releaser -p ${2:-$preset} &&
    conventional-github-releaser -p ${2:-$preset}
    }
  7. @stevemao stevemao revised this gist Aug 13, 2015. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions np.sh
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,7 @@
    # and optional argument preset `angular`/ `jquery` ...
    # defaults to conventional-commits-detector
    np() {
    travis status &&
    trash node_modules &>/dev/null;
    git pull --rebase &&
    npm install &&
    @@ -29,6 +30,7 @@ np() {

    # apm publish with goodies
    ap() {
    travis status &&
    trash node_modules &>/dev/null;
    git pull --rebase &&
    npm install &&
  8. @stevemao stevemao revised this gist Aug 12, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion np.sh
    Original file line number Diff line number Diff line change
    @@ -21,7 +21,7 @@ np() {
    version=`cat package.json | json version` &&
    git commit -m"docs(CHANGELOG): $version" &&
    mv -f _package.json package.json &&
    npm version ${1:-$bump} &&
    npm version ${1:-$bump} -m "chore: release %s" &&
    git push --follow-tags &&
    conventional-github-releaser -p ${2:-$preset} &&
    npm publish
  9. @stevemao stevemao revised this gist Aug 12, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions np.sh
    Original file line number Diff line number Diff line change
    @@ -33,6 +33,7 @@ ap() {
    git pull --rebase &&
    npm install &&
    apm install &&
    npm test &&
    apm test &&
    cp package.json _package.json &&
    preset=`conventional-commits-detector` &&
  10. @stevemao stevemao revised this gist Aug 12, 2015. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion np.sh
    Original file line number Diff line number Diff line change
    @@ -32,7 +32,8 @@ ap() {
    trash node_modules &>/dev/null;
    git pull --rebase &&
    npm install &&
    npm test &&
    apm install &&
    apm test &&
    cp package.json _package.json &&
    preset=`conventional-commits-detector` &&
    echo $preset &&
  11. @stevemao stevemao revised this gist Aug 12, 2015. 1 changed file with 22 additions and 0 deletions.
    22 changes: 22 additions & 0 deletions np.sh
    Original file line number Diff line number Diff line change
    @@ -26,3 +26,25 @@ np() {
    conventional-github-releaser -p ${2:-$preset} &&
    npm publish
    }

    # apm publish with goodies
    ap() {
    trash node_modules &>/dev/null;
    git pull --rebase &&
    npm install &&
    npm test &&
    cp package.json _package.json &&
    preset=`conventional-commits-detector` &&
    echo $preset &&
    bump=`conventional-recommended-bump -p angular` &&
    echo ${1:-$bump} &&
    npm --no-git-tag-version version ${1:-$bump} &>/dev/null &&
    conventional-changelog -i CHANGELOG.md -w -p ${2:-$preset} &&
    git add CHANGELOG.md &&
    version=`cat package.json | json version` &&
    git commit -m"docs(CHANGELOG): $version" &&
    mv -f _package.json package.json &&
    apm publish ${1:-$bump} &&
    git push --follow-tags &&
    conventional-github-releaser -p ${2:-$preset} &&
    }
  12. @stevemao stevemao revised this gist Aug 12, 2015. No changes.
  13. @stevemao stevemao revised this gist Aug 12, 2015. No changes.
  14. @stevemao stevemao revised this gist Aug 12, 2015. 1 changed file with 6 additions and 4 deletions.
    10 changes: 6 additions & 4 deletions np.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # npm publish with goodies
    # prerequisites:
    # `npm install -g trash conventional-recommended-bump conventional-changelog conventional-github-releaser conventional-commits-detector`
    # `npm install -g trash conventional-recommended-bump conventional-changelog conventional-github-releaser conventional-commits-detector json`
    # `np` with optional argument `patch`/`minor`/`major`/`<version>`
    # defaults to conventional-recommended-bump
    # and optional argument preset `angular`/ `jquery` ...
    @@ -10,15 +10,17 @@ np() {
    git pull --rebase &&
    npm install &&
    npm test &&
    cp package.json _package.json
    cp package.json _package.json &&
    preset=`conventional-commits-detector` &&
    echo $preset &&
    bump=`conventional-recommended-bump -p angular` &&
    echo ${1:-$bump} &&
    npm --no-git-tag-version version ${1:-$bump} &>/dev/null &&
    conventional-changelog -i CHANGELOG.md -w -p ${2:-$preset} &&
    rm -f package.json &&
    mv _package.json package.json &&
    git add CHANGELOG.md &&
    version=`cat package.json | json version` &&
    git commit -m"docs(CHANGELOG): $version" &&
    mv -f _package.json package.json &&
    npm version ${1:-$bump} &&
    git push --follow-tags &&
    conventional-github-releaser -p ${2:-$preset} &&
  15. @stevemao stevemao revised this gist Aug 12, 2015. 1 changed file with 6 additions and 4 deletions.
    10 changes: 6 additions & 4 deletions np.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    # npm publish with goodies
    # prerequisite:
    # prerequisites:
    # `npm install -g trash conventional-recommended-bump conventional-changelog conventional-github-releaser conventional-commits-detector`
    # `np` with optional argument `patch`/`minor`/`major`/`<version>`
    # defaults to conventional-recommended-bump
    @@ -12,13 +12,15 @@ np() {
    npm test &&
    cp package.json _package.json
    preset=`conventional-commits-detector` &&
    echo $preset &&
    bump=`conventional-recommended-bump -p angular` &&
    npm --no-git-tag-version version ${1:-$bump} &&
    conventional-changelog -i CHANGELOG.md -w -p ${2:-preset} &&
    echo ${1:-$bump} &&
    npm --no-git-tag-version version ${1:-$bump} &>/dev/null &&
    conventional-changelog -i CHANGELOG.md -w -p ${2:-$preset} &&
    rm -f package.json &&
    mv _package.json package.json &&
    npm version ${1:-$bump} &&
    git push --follow-tags &&
    conventional-github-releaser -p ${2:-preset} &&
    conventional-github-releaser -p ${2:-$preset} &&
    npm publish
    }
  16. @stevemao stevemao revised this gist Aug 12, 2015. 1 changed file with 8 additions and 7 deletions.
    15 changes: 8 additions & 7 deletions np.sh
    Original file line number Diff line number Diff line change
    @@ -1,23 +1,24 @@
    # npm publish with goodies
    # prerequisites:
    # `npm install -g trash conventional-recommended-bump conventional-changelog conventional-github-releaser`
    # prerequisite:
    # `npm install -g trash conventional-recommended-bump conventional-changelog conventional-github-releaser conventional-commits-detector`
    # `np` with optional argument `patch`/`minor`/`major`/`<version>`
    # defaults to recommended-bump
    # defaults to conventional-recommended-bump
    # and optional argument preset `angular`/ `jquery` ...
    # defaults to angular
    # defaults to conventional-commits-detector
    np() {
    trash node_modules &>/dev/null;
    git pull --rebase &&
    npm install &&
    npm test &&
    cp package.json _package.json
    bump=`conventional-recommended-bump -p ${2:-angular}` &&
    preset=`conventional-commits-detector` &&
    bump=`conventional-recommended-bump -p angular` &&
    npm --no-git-tag-version version ${1:-$bump} &&
    conventional-changelog -i CHANGELOG.md -w -p ${2:-angular} &&
    conventional-changelog -i CHANGELOG.md -w -p ${2:-preset} &&
    rm -f package.json &&
    mv _package.json package.json &&
    npm version ${1:-$bump} &&
    git push --follow-tags &&
    conventional-github-releaser -p ${2:-angular} &&
    conventional-github-releaser -p ${2:-preset} &&
    npm publish
    }
  17. @stevemao stevemao revised this gist Aug 12, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion np.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    # npm publish with goodies
    # prerequisite:
    # prerequisites:
    # `npm install -g trash conventional-recommended-bump conventional-changelog conventional-github-releaser`
    # `np` with optional argument `patch`/`minor`/`major`/`<version>`
    # defaults to recommended-bump
  18. @stevemao stevemao revised this gist Aug 12, 2015. 1 changed file with 21 additions and 11 deletions.
    32 changes: 21 additions & 11 deletions np.sh
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,23 @@
    # npm publish with goodies
    # prerequisite: `npm install -g trash`
    # `np` with an optional argument `patch`/`minor`/`major`/`<version>`
    # defaults to `patch`
    # prerequisite:
    # `npm install -g trash conventional-recommended-bump conventional-changelog conventional-github-releaser`
    # `np` with optional argument `patch`/`minor`/`major`/`<version>`
    # defaults to recommended-bump
    # and optional argument preset `angular`/ `jquery` ...
    # defaults to angular
    np() {
    trash node_modules &>/dev/null;
    git pull --rebase &&
    npm install &&
    npm test &&
    npm version ${1:-patch} &&
    npm publish &&
    git push --follow-tags
    }
    trash node_modules &>/dev/null;
    git pull --rebase &&
    npm install &&
    npm test &&
    cp package.json _package.json
    bump=`conventional-recommended-bump -p ${2:-angular}` &&
    npm --no-git-tag-version version ${1:-$bump} &&
    conventional-changelog -i CHANGELOG.md -w -p ${2:-angular} &&
    rm -f package.json &&
    mv _package.json package.json &&
    npm version ${1:-$bump} &&
    git push --follow-tags &&
    conventional-github-releaser -p ${2:-angular} &&
    npm publish
    }
  19. @sindresorhus sindresorhus revised this gist Aug 12, 2014. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions np.sh
    Original file line number Diff line number Diff line change
    @@ -4,10 +4,10 @@
    # defaults to `patch`
    np() {
    trash node_modules &>/dev/null;
    git pull --rebase && \
    npm install && \
    npm test && \
    npm version ${1:-patch} && \
    npm publish && \
    git pull --rebase &&
    npm install &&
    npm test &&
    npm version ${1:-patch} &&
    npm publish &&
    git push --follow-tags
    }
  20. @sindresorhus sindresorhus renamed this gist Jun 11, 2014. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion np.zsh → np.sh
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,13 @@
    # npm publish with goodies
    # prerequisite: `npm install -g trash`
    # `np` with an optional argument `patch`/`minor`/`major`/`<version>`
    # defaults to `patch`
    np() {
    trash node_modules &>/dev/null;
    git pull --rebase && \
    npm install && \
    npm test && \
    npm version ${1:=patch} && \
    npm version ${1:-patch} && \
    npm publish && \
    git push --follow-tags
    }
  21. @sindresorhus sindresorhus created this gist Jan 15, 2014.
    12 changes: 12 additions & 0 deletions np.zsh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    # npm publish with goodies
    # `np` with an optional argument `patch`/`minor`/`major`/`<version>`
    # defaults to `patch`
    np() {
    trash node_modules &>/dev/null;
    git pull --rebase && \
    npm install && \
    npm test && \
    npm version ${1:=patch} && \
    npm publish && \
    git push --follow-tags
    }