-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
no more concurrency. breaks computer
- Loading branch information
1 parent
ce61a75
commit 4270782
Showing
4 changed files
with
87 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## How publishing this module works | ||
|
||
HarperDB Components require the `config.yaml` to be in the root of the project; however, in order for the Docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { spawn } from 'child_process'; | ||
import { createHash } from 'crypto'; | ||
import { join } from 'path'; | ||
import { pipeline } from 'stream/promises'; | ||
|
||
export function getCacheBustValue() { | ||
return new Promise((resolve, reject) => { | ||
const proc = spawn('git', ['status', '--porcelain'], { cwd: join(import.meta.dirname, '..') }) | ||
proc.on('error', reject); | ||
const hash = createHash('sha1'); | ||
pipeline(proc.stdout, hash).then(() => resolve(hash.digest('hex'))).catch(reject); | ||
}); | ||
} | ||
|
||
export const CACHE_BUST = getCacheBustValue(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters