-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update package.json according to connect and add skeleton for post de…
…ploy scripts
- Loading branch information
1 parent
c7050b5
commit 46e0a6d
Showing
3 changed files
with
38 additions
and
5 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
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,17 @@ | ||
|
||
async function postDeploy(properties) { | ||
|
||
// TODO: Implement postDeploy scripts if any | ||
} | ||
|
||
async function run() { | ||
try { | ||
const properties = new Map(Object.entries(process.env)); | ||
await postDeploy(properties); | ||
} catch (error) { | ||
process.stderr.write(`Post-deploy failed: ${error.message}\n`); | ||
process.exitCode = 1; | ||
} | ||
} | ||
|
||
run(); |
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,14 @@ | ||
async function preUndeploy() { | ||
// TODO: Implement pre undeploy scripts if any | ||
} | ||
|
||
async function run() { | ||
try { | ||
await preUndeploy(); | ||
} catch (error) { | ||
process.stderr.write(`Post-undeploy failed: ${error.message}\n`); | ||
process.exitCode = 1; | ||
} | ||
} | ||
|
||
run(); |