Skip to content

Commit

Permalink
fix: remove dotenv (#132)
Browse files Browse the repository at this point in the history
dotenv was used for testing of the `build.js` script and is not needed
anymore.

Removing it for security reasons. 

There weren't any major concerns but some fat-finger errors may have led
to deployment problems. The envars are set in the build environments
(e.g. cloudflare) or have sane fallback defaults.
  • Loading branch information
CjS77 authored Mar 6, 2024
1 parent ead2b4d commit b1a60b5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
3 changes: 1 addition & 2 deletions build.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env node
require('dotenv').config({ path: './mdbook.env'});
const axios = require('axios');
const fs = require('fs');
const fsp = fs.promises;
Expand All @@ -8,7 +7,7 @@ const { exec } = require('child_process');
const tar = require('tar');

const VERSION = process.env.MDBOOK_VERSION || '0.4.37'; // replace with the version you want
const MDBOOK_HASH = process.env.MDBOOK_HASH;
const MDBOOK_HASH = process.env.MDBOOK_HASH || "93f9a98032be3f4b7b4bab42fdc97d58b5d69d81eef910a5c8fa68e03fbf8a8d";
const url = `https://github.com/rust-lang/mdBook/releases/download/v${VERSION}/mdbook-v${VERSION}-x86_64-unknown-linux-gnu.tar.gz`;

async function downloadFile(url, path) {
Expand Down
12 changes: 0 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"license": "BSD-3-Clause",
"dependencies": {
"axios": "=1.6.7",
"dotenv": "=16.4.5",
"tar": "=6.2.0"
}
}

0 comments on commit b1a60b5

Please sign in to comment.