Skip to content

Commit ee95319

Browse files
committed
update exports.md
1 parent 609a59a commit ee95319

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

recipes/make/exports.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,28 @@ I don't know if these defaults are actually used here.
2020
include defaults.mk
2121

2222
check-env :
23-
@echo "ENVIRONMENT is only 'prod'. And needed for backwards compatibility. Exporting... ";
24-
@export ENVIRONTMENT=prod;
25-
@if [ -z $(PROGRAM) ]; then \
26-
echo "PROGRAM must be set; export PROGRAM=<program>"; exit 10; \
27-
fi
23+
@echo "ENVIRONMENT is only 'prod'. And needed for backwards compatibility. Exporting... ";
24+
@export ENVIRONMENT=prod;
25+
@if [ -z $(PROGRAM) ]; then \
26+
echo "PROGRAM must be set; export PROGRAM=<program>"; exit 10; \
27+
fi
2828
```
2929

3030
## StackOverflow sample
3131

3232
[link](https://stackoverflow.com/questions/24263291/define-a-makefile-variable-using-a-env-variable-or-a-default-value)
3333

34+
Use lines here start with a colon to print only and not execute.
35+
3436
- `Makefile`
3537
```Makefile
3638
T ?= foo
39+
3740
all:
38-
: '$(T)'
41+
: '$(T)'
3942
```
4043

41-
```sh
44+
```console
4245
$ make
4346
: 'foo'
4447

@@ -65,11 +68,9 @@ $ make TMPDIR=foo
6568
foo
6669
```
6770

68-
69-
7071
For debugging, check the value of the token.
7172

72-
B. Only run this on a remote if the logs are private, so no one steals your token on a PR preview. GitHub now hides secrets, does Netlify? Should builds be restricted to only PRs by me and not forks to avoid someone making a preview that expposes a token? The easiest is just private logs.
73+
B. Only run this on a remote if the logs are private, so no one steals your token on a PR preview. GitHub now hides secrets, does Netlify? Should builds be restricted to only PRs by me and not forks to avoid someone making a preview that exposes a token? The easiest is just private logs.
7374

7475
```Makefile
7576
export GITHUB_TOKEN := $(if $(GITHUB_TOKEN), $(GITHUB_TOKEN), '')

0 commit comments

Comments
 (0)