Skip to content

Commit cafecd4

Browse files
committed
Drop dotenv module requirement
1 parent 3ce02e2 commit cafecd4

File tree

4 files changed

+16
-14
lines changed

4 files changed

+16
-14
lines changed

README.md

+1-11
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ Dependencies are installed to a `.deps` directory, with executables in `.deps/bi
3030
- [.devkit Modules](#devkit-modules)
3131
- [All-Purpose Modules](#all-purpose-modules)
3232
* [cram](#cram)
33-
* [dotenv](#dotenv)
3433
* [shell-console](#shell-console)
3534
- [Watch Modules](#watch-modules)
3635
* [entr-watch](#entr-watch)
@@ -150,14 +149,6 @@ As long as you run cram via `script/test`, `dk test`, or `dk cram`, you can plac
150149

151150
Setup files can source other shell files, including other directories' `cram-setup.sh` files if you need to share setup between directories (e.g. `source "$TESTDIR/../cram-setup.sh"` to source and extend a parent directory's setup). You can also just symlink from one cram-setup.sh to another.
152151

153-
#### dotenv
154-
155-
The [dotenv](modules/dotenv) module sources a local clone of the [bashup/dotenv](https://github.com/bashup/dotenv/) tool for manipulating .env files in [docker-compose format](https://docs.docker.com/compose/compose-file/#env_file). After a `dk use: dotenv`, the rest of your `.dkrc` can use the `.env` function to read, edit, and set defaults in `.env` files -- perfect for project setup scripts or other commands that need configuration.
156-
157-
In addition, if you are using `direnv` (or the console command of the shell-console module), then you can also use the `dotenv` command directly on the command line.
158-
159-
For more information on how `dotenv` and `.env` work, please see the [dotenv documentation](https://github.com/bashup/dotenv/).
160-
161152
#### shell-console
162153

163154
The [shell-console](modules/shell-console) module implements a `dk.console` function to provide a `script/console` command that starts a bash subshell with the devkit API and all variables available -- a bit like dropping into a debugger for the `dk` command. This is particularly handy if you don't have or use `direnv`, as it basically gives you an alternative to typing `script/foo` or `.devkit/dk foo`: within the subshell you can just `dk foo`.
@@ -339,5 +330,4 @@ The following variables control the operation of the container:
339330

340331
Inside the docker container, a `run-bash VERSION command...` command is run first, allowing you to do any docker-specific setup (e.g. installing additional dependencies) by either overriding the command or defining a `before` handler for the `run-bash` event.
341332

342-
Note: the docker container will use `.deps/.bash-VERSION` as its `/workdir/.deps`, so that its installed dependencies can be platform-specific. Running `clean` inside a container will clean only the dependencies for that bash version, while running `clean` outside the container will wipe dependencies for both the base project and all bash versions used to that point.
343-
333+
Note: the docker container will use `.deps/.bash-VERSION` as its `/workdir/.deps`, so that its installed dependencies can be platform-specific. Running `clean` inside a container will clean only the dependencies for that bash version, while running `clean` outside the container will wipe dependencies for both the base project and all bash versions used to that point.

modules/dotenv

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
11
#!/usr/bin/env bash
2+
echo '
3+
----------------------------------------------------------------------------
4+
The dotenv module is deprecated!
5+
6+
The `.env` function is now available to .devkit commands by default, without
7+
using this module.
8+
9+
If your project needs the `dotenv` command or uses it as a build dependency,
10+
just add `bashup/dotenv` to BUILD_DEPS in your project'"'"'s package.sh.
11+
12+
You can then remove `dotenv` from your `dk use:` list.
13+
----------------------------------------------------------------------------
14+
' >&2
15+
216
require dotenv github bashup/dotenv master dotenv
3-
source "${BASHER_INSTALL_BIN}"/dotenv

sample.dkrc

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
# -- Shell/Generic Modules --
1111
# dk use: bash-kit # enable `with-bash` command to use different bash versions
1212
# dk use: cram # run tests using the "cram" functional test tool
13-
# dk use: dotenv # manipulate .env files (docker-compose format)
1413
# dk use: shell-console # make the "console" command enter a subshell
1514

1615
# -- Watch Modules --

specs/Setup.cram.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ With git (dirty):
7070

7171
$ git commit -m "Added devkit"
7272
[master (root-commit) *] Added devkit (glob)
73-
13 files changed, 98 insertions(+)
73+
13 files changed, 97 insertions(+)
7474
create mode 100644 .dkrc
7575
create mode 100644 .envrc
7676
create mode 100644 .gitignore

0 commit comments

Comments
 (0)