FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ui/.github/version-script-beta.js at main · WebWorksCollection/ui · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
WebWorksCollection
/
ui
Public
forked from
shadcn-ui/ui
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
ui
/
.github
/
version-script-beta.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
21 lines (19 loc) · 597 Bytes
Breadcrumbs
ui
/
.github
/
version-script-beta.js
Copy path
File metadata and controls
21 lines (19 loc) · 597 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// ORIGINALLY FROM CLOUDFLARE WRANGLER:
// https://github.com/cloudflare/wrangler2/blob/main/.github/version-script.js
import
{
exec
}
from
"child_process"
import
fs
from
"fs"
const
pkgJsonPath
=
"packages/cli/package.json"
try
{
const
pkg
=
JSON
.
parse
(
fs
.
readFileSync
(
pkgJsonPath
)
)
exec
(
"git rev-parse --short HEAD"
,
(
err
,
stdout
)
=>
{
if
(
err
)
{
console
.
log
(
err
)
process
.
exit
(
1
)
}
pkg
.
version
=
"0.0.0-beta."
+
stdout
.
trim
(
)
fs
.
writeFileSync
(
pkgJsonPath
,
JSON
.
stringify
(
pkg
,
null
,
"\t"
)
+
"\n"
)
}
)
}
catch
(
error
)
{
console
.
error
(
error
)
process
.
exit
(
1
)
}
Back
|
FazBrowse Home
|
New Git URL