Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add release script targets to project Makefile

Project Makefile targets now include: start, stop, restart, reboot, console,
attach, ping. Previous console target is now 'dev'.
  • Loading branch information...
commit 0f1b97da6bbe2a0790cb184ac40953df3d85ec6a 1 parent 72b4b79
Susan Potter authored

Showing 1 changed file with 20 additions and 9 deletions. Show diff stats Hide diff stats

  1. +20 9 project_Makefile
29 project_Makefile
@@ -2,8 +2,10 @@ ERL ?= erl
2 2 ERLC = erlc
3 3 EBIN_DIRS := $(wildcard deps/*/ebin)
4 4 APPS := $(shell dir apps)
  5 +REL_DIR = rel
5 6 NODE = {{name}}
6 7 REL = {{name}}
  8 +SCRIPT_PATH := $(REL_DIR)/$(NODE)/bin/$(REL)
7 9
8 10 .PHONY: rel deps
9 11
@@ -28,17 +30,26 @@ test:
28 30 rel: deps
29 31 @rebar compile generate
30 32
31   -start: rel
32   - @./rel/$(NODE)/bin/$(REL) start
  33 +start: $(SCRIPT_PATH)
  34 + @./$(SCRIPT_PATH) start
33 35
34   -stop:
35   - @./rel/$(NODE)/bin/$(REL) stop
  36 +stop: $(SCRIPT_PATH)
  37 + @./$(SCRIPT_PATH) stop
36 38
37   -ping:
38   - @./rel/$(NODE)/bin/$(REL) ping
  39 +ping: $(SCRIPT_PATH)
  40 + @./$(SCRIPT_PATH) ping
39 41
40   -attach:
41   - @./rel/$(NODE)/bin/$(REL) attach
  42 +attach: $(SCRIPT_PATH)
  43 + @./$(SCRIPT_PATH) attach
  44 +
  45 +console: $(SCRIPT_PATH)
  46 + @./$(SCRIPT_PATH) console
  47 +
  48 +restart: $(SCRIPT_PATH)
  49 + @./$(SCRIPT_PATH) restart
  50 +
  51 +reboot: $(SCRIPT_PATH)
  52 + @./$(SCRIPT_PATH) reboot
42 53
43 54 doc:
44 55 rebar skip_deps=true doc
@@ -46,7 +57,7 @@ doc:
46 57 cp -R apps/$${app}/doc doc/$${app}; \
47 58 done;
48 59
49   -console:
  60 +dev:
50 61 @erl -pa ebin include deps/*/ebin deps/*/include ebin include -boot start_sasl
51 62
52 63 analyze: checkplt

0 comments on commit 0f1b97d

Please sign in to comment.
Something went wrong with that request. Please try again.