-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
83ad4b1
commit 3a7b338
Showing
2 changed files
with
22 additions
and
21 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 |
---|---|---|
@@ -1,24 +1,22 @@ | ||
import 'zx/globals'; | ||
|
||
const sha = process.argv[2] || process.env.GITHUB_SHA; | ||
const sha = process.argv[2] || process.env.GITHUB_SHA || 'HEAD'; | ||
|
||
await $`git show ${sha}`; | ||
try { | ||
const modifiedPackages = | ||
await $`git show ${sha} --pretty="format:" --name-only -- packages/*/package.json`.nothrow(); | ||
|
||
const modifiedPackages = | ||
await $`git show ${sha} --pretty="format:" --name-only -- packages/*/package.json`; | ||
const packageJsonPaths = modifiedPackages.stdout.trim().split('\n'); | ||
|
||
const packageJsonPaths = modifiedPackages.stdout.trim().split('\n'); | ||
const packageJsons = await Promise.all( | ||
packageJsonPaths.map((p) => fs.readJson(p)) | ||
); | ||
|
||
if (packageJsonPaths.length) { | ||
const packageJsons = await Promise.all( | ||
packageJsonPaths.map((p) => fs.readJson(p)) | ||
); | ||
|
||
for (const packageJson of packageJsons) { | ||
const tag = `${packageJson.name}@${packageJson.version}`; | ||
//await $`git tag ${tag}`; | ||
console.log({ tag }) | ||
} | ||
} else { | ||
console.log('No tags need to be created'); | ||
for (const packageJson of packageJsons) { | ||
const tag = `${packageJson.name}@${packageJson.version}`; | ||
//await $`git tag ${tag}`; | ||
console.log({ tag }); | ||
} | ||
} catch { | ||
console.log('No tags need to be created'); | ||
} |
3a7b338
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
proxy-agents – ./
proxy-agents-tootallnate.vercel.app
proxy-agents-git-main-tootallnate.vercel.app
proxy-agents.vercel.app