mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Update erlang.mk and update paths to start the release
Fixes a couple invalid instructions at the same time.
This commit is contained in:
parent
73f65d5a75
commit
abcc6e96d8
20 changed files with 32 additions and 28 deletions
22
erlang.mk
vendored
22
erlang.mk
vendored
|
@ -21,7 +21,7 @@ PROJECT ?= $(notdir $(CURDIR))
|
||||||
PKG_FILE ?= $(CURDIR)/.erlang.mk.packages.v1
|
PKG_FILE ?= $(CURDIR)/.erlang.mk.packages.v1
|
||||||
export PKG_FILE
|
export PKG_FILE
|
||||||
|
|
||||||
PKG_FILE_URL ?= https://raw.github.com/extend/erlang.mk/master/packages.v1.tsv
|
PKG_FILE_URL ?= https://raw.githubusercontent.com/extend/erlang.mk/master/packages.v1.tsv
|
||||||
|
|
||||||
define get_pkg_file
|
define get_pkg_file
|
||||||
wget --no-check-certificate -O $(PKG_FILE) $(PKG_FILE_URL) || rm $(PKG_FILE)
|
wget --no-check-certificate -O $(PKG_FILE) $(PKG_FILE_URL) || rm $(PKG_FILE)
|
||||||
|
@ -58,8 +58,13 @@ ifneq ($(wildcard $(RELX_CONFIG)),)
|
||||||
RELX ?= $(CURDIR)/relx
|
RELX ?= $(CURDIR)/relx
|
||||||
export RELX
|
export RELX
|
||||||
|
|
||||||
RELX_URL ?= https://github.com/erlware/relx/releases/download/v0.6.0/relx
|
RELX_URL ?= https://github.com/erlware/relx/releases/download/v1.0.2/relx
|
||||||
RELX_OPTS ?=
|
RELX_OPTS ?=
|
||||||
|
RELX_OUTPUT_DIR ?= _rel
|
||||||
|
|
||||||
|
ifneq ($(firstword $(subst -o,,$(RELX_OPTS))),)
|
||||||
|
RELX_OUTPUT_DIR = $(firstword $(subst -o,,$(RELX_OPTS)))
|
||||||
|
endif
|
||||||
|
|
||||||
define get_relx
|
define get_relx
|
||||||
wget -O $(RELX) $(RELX_URL) || rm $(RELX)
|
wget -O $(RELX) $(RELX_URL) || rm $(RELX)
|
||||||
|
@ -73,7 +78,7 @@ $(RELX):
|
||||||
@$(call get_relx)
|
@$(call get_relx)
|
||||||
|
|
||||||
clean-rel:
|
clean-rel:
|
||||||
@rm -rf _rel
|
$(gen_verbose) rm -rf $(RELX_OUTPUT_DIR)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -111,9 +116,9 @@ clean-all: clean clean-deps clean-docs
|
||||||
|
|
||||||
app: ebin/$(PROJECT).app
|
app: ebin/$(PROJECT).app
|
||||||
$(eval MODULES := $(shell find ebin -type f -name \*.beam \
|
$(eval MODULES := $(shell find ebin -type f -name \*.beam \
|
||||||
| sed 's/ebin\///;s/\.beam/,/' | sed '$$s/.$$//'))
|
| sed "s/ebin\//'/;s/\.beam/',/" | sed '$$s/.$$//'))
|
||||||
$(appsrc_verbose) cat src/$(PROJECT).app.src \
|
$(appsrc_verbose) cat src/$(PROJECT).app.src \
|
||||||
| sed 's/{modules,[[:space:]]*\[\]}/{modules, \[$(MODULES)\]}/' \
|
| sed "s/{modules,[[:space:]]*\[\]}/{modules, \[$(MODULES)\]}/" \
|
||||||
> ebin/$(PROJECT).app
|
> ebin/$(PROJECT).app
|
||||||
|
|
||||||
define compile_erl
|
define compile_erl
|
||||||
|
@ -225,8 +230,7 @@ CT_RUN = ct_run \
|
||||||
-noshell \
|
-noshell \
|
||||||
-pa $(realpath ebin) $(DEPS_DIR)/*/ebin \
|
-pa $(realpath ebin) $(DEPS_DIR)/*/ebin \
|
||||||
-dir test \
|
-dir test \
|
||||||
-logdir logs \
|
-logdir logs
|
||||||
$(CT_OPTS)
|
|
||||||
|
|
||||||
CT_SUITES ?=
|
CT_SUITES ?=
|
||||||
|
|
||||||
|
@ -236,7 +240,7 @@ test_$(1): clean deps app build-tests
|
||||||
@if [ -d "test" ] ; \
|
@if [ -d "test" ] ; \
|
||||||
then \
|
then \
|
||||||
mkdir -p logs/ ; \
|
mkdir -p logs/ ; \
|
||||||
$(CT_RUN) -suite $(addsuffix _SUITE,$(1)) ; \
|
$(CT_RUN) -suite $(addsuffix _SUITE,$(1)) $(CT_OPTS) ; \
|
||||||
fi
|
fi
|
||||||
$(gen_verbose) rm -f test/*.beam
|
$(gen_verbose) rm -f test/*.beam
|
||||||
endef
|
endef
|
||||||
|
@ -248,7 +252,7 @@ tests: clean deps app build-tests
|
||||||
@if [ -d "test" ] ; \
|
@if [ -d "test" ] ; \
|
||||||
then \
|
then \
|
||||||
mkdir -p logs/ ; \
|
mkdir -p logs/ ; \
|
||||||
$(CT_RUN) -suite $(addsuffix _SUITE,$(CT_SUITES)) ; \
|
$(CT_RUN) -suite $(addsuffix _SUITE,$(CT_SUITES)) $(CT_OPTS) ; \
|
||||||
fi
|
fi
|
||||||
$(gen_verbose) rm -f test/*.beam
|
$(gen_verbose) rm -f test/*.beam
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ $ make
|
||||||
To start the release in the foreground:
|
To start the release in the foreground:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
$ ./_rel/bin/chunked_hello_world_example console
|
$ ./_rel/chunked_hello_world_example/bin/chunked_hello_world_example console
|
||||||
```
|
```
|
||||||
|
|
||||||
Then point your browser at [http://localhost:8080](http://localhost:8080),
|
Then point your browser at [http://localhost:8080](http://localhost:8080),
|
||||||
|
|
|
@ -12,7 +12,7 @@ $ make
|
||||||
To start the release in the foreground:
|
To start the release in the foreground:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
$ ./_rel/bin/compress_response_example console
|
$ ./_rel/compress_response_example/bin/compress_response_example console
|
||||||
```
|
```
|
||||||
|
|
||||||
Then point your browser at [http://localhost:8080](http://localhost:8080).
|
Then point your browser at [http://localhost:8080](http://localhost:8080).
|
||||||
|
|
|
@ -12,7 +12,7 @@ $ make
|
||||||
To start the release in the foreground:
|
To start the release in the foreground:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
$ ./_rel/bin/cookie_example console
|
$ ./_rel/cookie_example/bin/cookie_example console
|
||||||
```
|
```
|
||||||
|
|
||||||
Then point your browser at [http://localhost:8080](http://localhost:8080).
|
Then point your browser at [http://localhost:8080](http://localhost:8080).
|
||||||
|
|
|
@ -12,7 +12,7 @@ $ make
|
||||||
To start the release in the foreground:
|
To start the release in the foreground:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
$ ./_rel/bin/echo_get_example console
|
$ ./_rel/echo_get_example/bin/echo_get_example console
|
||||||
```
|
```
|
||||||
|
|
||||||
Then point your browser at
|
Then point your browser at
|
||||||
|
|
|
@ -12,7 +12,7 @@ $ make
|
||||||
To start the release in the foreground:
|
To start the release in the foreground:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
$ ./_rel/bin/echo_post_example console
|
$ ./_rel/echo_post_example/bin/echo_post_example console
|
||||||
```
|
```
|
||||||
|
|
||||||
As this example echoes a POST parameter, it is a little more
|
As this example echoes a POST parameter, it is a little more
|
||||||
|
|
|
@ -12,7 +12,7 @@ $ make
|
||||||
To start the release in the foreground:
|
To start the release in the foreground:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
$ ./_rel/bin/error_hook_example console
|
$ ./_rel/error_hook_example/bin/error_hook_example console
|
||||||
```
|
```
|
||||||
|
|
||||||
Then point your browser at [http://localhost:8080](http://localhost:8080).
|
Then point your browser at [http://localhost:8080](http://localhost:8080).
|
||||||
|
|
|
@ -12,7 +12,7 @@ $ make
|
||||||
To start the release in the foreground:
|
To start the release in the foreground:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
$ ./_rel/bin/eventsource_example console
|
$ ./_rel/eventsource_example/bin/eventsource_example console
|
||||||
```
|
```
|
||||||
|
|
||||||
Then point your EventSource capable browser at
|
Then point your EventSource capable browser at
|
||||||
|
|
|
@ -12,7 +12,7 @@ $ make
|
||||||
To start the release in the foreground:
|
To start the release in the foreground:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
$ ./_rel/bin/hello_world_example console
|
$ ./_rel/hello_world_example/bin/hello_world_example console
|
||||||
```
|
```
|
||||||
|
|
||||||
Then point your browser at [http://localhost:8080](http://localhost:8080).
|
Then point your browser at [http://localhost:8080](http://localhost:8080).
|
||||||
|
|
|
@ -12,7 +12,7 @@ $ make
|
||||||
To start the release in the foreground:
|
To start the release in the foreground:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
$ ./_rel/bin/hello_world_example console
|
$ ./_rel/markdown_middleware_example/bin/markdown_middleware_example console
|
||||||
```
|
```
|
||||||
|
|
||||||
Then point your browser at
|
Then point your browser at
|
||||||
|
|
|
@ -12,7 +12,7 @@ $ make
|
||||||
To start the release in the foreground:
|
To start the release in the foreground:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
$ ./_rel/bin/rest_basic_auth_example console
|
$ ./_rel/rest_basic_auth_example/bin/rest_basic_auth_example console
|
||||||
```
|
```
|
||||||
|
|
||||||
Then point your browser at [http://localhost:8080](http://localhost:8080).
|
Then point your browser at [http://localhost:8080](http://localhost:8080).
|
||||||
|
|
|
@ -12,7 +12,7 @@ $ make
|
||||||
To start the release in the foreground:
|
To start the release in the foreground:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
$ ./_rel/bin/hello_world_example console
|
$ ./_rel/rest_hello_world_example/bin/rest_hello_world_example console
|
||||||
```
|
```
|
||||||
|
|
||||||
Then point your browser at [http://localhost:8080](http://localhost:8080).
|
Then point your browser at [http://localhost:8080](http://localhost:8080).
|
||||||
|
|
|
@ -12,7 +12,7 @@ $ make
|
||||||
To start the release in the foreground:
|
To start the release in the foreground:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
$ ./_rel/bin/rest_pastebin_example console
|
$ ./_rel/rest_pastebin_example/bin/rest_pastebin_example console
|
||||||
```
|
```
|
||||||
|
|
||||||
Then point your browser at [http://localhost:8080](http://localhost:8080).
|
Then point your browser at [http://localhost:8080](http://localhost:8080).
|
||||||
|
|
|
@ -12,7 +12,7 @@ $ make
|
||||||
To start the release in the foreground:
|
To start the release in the foreground:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
$ ./_rel/bin/rest_stream_response_example console
|
$ ./_rel/rest_stream_response_example/bin/rest_stream_response_example console
|
||||||
```
|
```
|
||||||
|
|
||||||
Then point your browser at [http://localhost:8080](http://localhost:8080).
|
Then point your browser at [http://localhost:8080](http://localhost:8080).
|
||||||
|
|
|
@ -12,7 +12,7 @@ $ make
|
||||||
To start the release in the foreground:
|
To start the release in the foreground:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
$ ./_rel/bin/ssl_hello_world_example console
|
$ ./_rel/ssl_hello_world_example/bin/ssl_hello_world_example console
|
||||||
```
|
```
|
||||||
|
|
||||||
Then point your browser at [https://localhost:8443](https://localhost:8443).
|
Then point your browser at [https://localhost:8443](https://localhost:8443).
|
||||||
|
|
|
@ -12,7 +12,7 @@ $ make
|
||||||
To start the release in the foreground:
|
To start the release in the foreground:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
$ ./_rel/bin/static_world_example console
|
$ ./_rel/static_world_example/bin/static_world_example console
|
||||||
```
|
```
|
||||||
|
|
||||||
The example will serve all the files found in the `priv`
|
The example will serve all the files found in the `priv`
|
||||||
|
|
|
@ -12,7 +12,7 @@ $ make
|
||||||
To start the release in the foreground:
|
To start the release in the foreground:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
$ ./_rel/bin/upload_example console
|
$ ./_rel/upload_example/bin/upload_example console
|
||||||
```
|
```
|
||||||
|
|
||||||
Then point your browser at [http://localhost:8080](http://localhost:8080).
|
Then point your browser at [http://localhost:8080](http://localhost:8080).
|
||||||
|
|
|
@ -12,7 +12,7 @@ $ make
|
||||||
To start the release in the foreground:
|
To start the release in the foreground:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
$ ./_rel/bin/web_server_example console
|
$ ./_rel/web_server_example/bin/web_server_example console
|
||||||
```
|
```
|
||||||
|
|
||||||
Then point your browser at [http://localhost:8080](http://localhost:8080)
|
Then point your browser at [http://localhost:8080](http://localhost:8080)
|
||||||
|
|
|
@ -12,7 +12,7 @@ $ make
|
||||||
To start the release in the foreground:
|
To start the release in the foreground:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
$ ./_rel/bin/websocket_example console
|
$ ./_rel/websocket_example/bin/websocket_example console
|
||||||
```
|
```
|
||||||
|
|
||||||
Then point your browser at [http://localhost:8080](http://localhost:8080).
|
Then point your browser at [http://localhost:8080](http://localhost:8080).
|
||||||
|
|
|
@ -305,7 +305,7 @@ We can now build and start the release.
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
$ make
|
$ make
|
||||||
$ ./_rel/bin/hello_erlang console
|
$ ./_rel/hello_erlang/bin/hello_erlang console
|
||||||
```
|
```
|
||||||
|
|
||||||
If you then access `http://localhost:8080` using your browser,
|
If you then access `http://localhost:8080` using your browser,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue