Skip to content

Commit

Permalink
Avoid magical --rebase (2.0.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
MoOx committed Jan 11, 2016
1 parent 6884d2d commit 993d8ae
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# 2.0.0 - 2016-01-11

- Changed: do not rebase by default, but instead show a warning if relevant.
- Fixed: no more ``*-trash`` warnings (``trash`` replaced by ``trash-cli``).
- Added: show a warning if you have unstashed changes or remote is unreadable.

# 1.0.0 - 2015-10-04

Expand Down
16 changes: 15 additions & 1 deletion npmpublish.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
#!/usr/bin/env sh
git pull --rebase &&

if test -n "$(git status --porcelain)"; then
echo 'Unclean working tree. Commit or stash changes first.' >&2;
exit 128;
fi

if ! git fetch --quiet 2>/dev/null; then
echo 'There was a problem fetching your branch.' >&2;
exit 128;
fi

if test "0" != "$(git rev-list --count --left-only @'{u}'...HEAD)"; then
echo 'Remote history differ. Please pull changes.' >&2;
exit 128;
fi

# get the current real path of this file so we can relative node_modules
# (in our case, trash-cli)
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"name": "npmpub",
"version": "1.0.0",
"version": "2.0.0",
"description": "Another better `npm publish`",
"keywords": [
"cli-app",
"cli",
"npm",
"publish",
"git",
"push"
"push",
"version",
"bump",
"commit"
],
"author": "Maxime Thirouin",
"license": "MIT",
Expand Down

0 comments on commit 993d8ae

Please sign in to comment.