Skip to content

Commit

Permalink
Update README and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
kallimachos committed Oct 30, 2017
1 parent 729413e commit c6efd85
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
4 changes: 3 additions & 1 deletion History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
1.3.2
=====
* added; `m installed [--json]` Output installed versions available (optionally, in JSON format) #28 [stennie](https://github.com/stennie)

1.3.1 / 2016-11-05
==================
Expand Down Expand Up @@ -110,4 +113,3 @@
==================

* initial release

24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Use or install the stable official release:
Install a custom or patched version of mongodb from a tarball:

$ m custom 2.1.2-me https://github.com/aheckmann/mongo/tarball/r2.1.2

Install a version of mongodb from source (requires `scons`):

$ m 2.2.3-rc0 source
Expand All @@ -60,7 +60,7 @@ them directly by asking `m` for the binary path:

$ m bin 2.0.7
/usr/local/m/versions/2.0.7/bin/

Start up mongod 2.0.7 regardless of the active version:

$ m use 2.0.7 --port 29000 --dbpath /data/2.0.7/
Expand All @@ -72,40 +72,40 @@ Execute a script with the 2.0.7 shell regardless of the active version:
with flags:

$ m s 2.0.7 --port 29000 --eval 1+1

When installing or changing the active version we might want to run custom scripts:

$ m pre install /path/to/my/script
$ m post install /path/to/script
$ m pre change /path/to/my/script
$ m post change /path/to/script

Multiple scripts may be added for any event. To add two `pre change` scripts:

$ m pre change /path/to/script1
$ m pre change /path/to/script2

Scripts are executed in the order they were added.

List all pre change hooks:

$ m pre change

/path/to/script1
/path/to/script2

List all post install hooks:

$ m post install

/path/to/scriptA
/path/to/scriptB
/path/to/scriptC

To remove a post install hook:

$ m post install rm /path/to/scriptB

Remove all post install hooks:

$ m post install rm
Expand All @@ -132,6 +132,7 @@ Output from `m --help`:
m --latest Output the latest mongodb version available
m --stable Output the latest stable mongodb version available
m ls Output the versions of mongodb available
m installed [--json] Output installed versions available (optionally, in JSON format)
m src <version> Output the url for source used for the given <version> (useful if installed from source)
m pre <event> [script] Declare one or list scripts to execute before <event> (scripts must use absolute paths)
m post <event> [script] Declare one or list scripts to execute after <event> (scripts must use absolute paths)
Expand Down Expand Up @@ -174,4 +175,3 @@ Output from `m --help`:
## Inspiration

Yes tj, this is nearly identical to [n](https://github.com/visionmedia/n). Huge thanks!

2 changes: 1 addition & 1 deletion bin/m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ VERSIONS_DIR=$M_DIR/versions
BUILD_DIR_BASE=$M_DIR/mongo-

# m version
VERSION="1.3.2-dev"
VERSION="1.3.2"

# log path
LOGPATH="/tmp/m.log"
Expand Down

0 comments on commit c6efd85

Please sign in to comment.