chore(deps): update lint (#1928)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
This commit is contained in:
parent
2838e18ff7
commit
3c43a1cdd1
62 changed files with 464 additions and 434 deletions
|
@ -28,14 +28,14 @@ export const gitBranch = process.env.BRANCH
|
|||
export const isPreview = isPR || process.env.CONTEXT === 'deploy-preview' || process.env.CONTEXT === 'dev'
|
||||
|
||||
const git = Git()
|
||||
export const getGitInfo = async () => {
|
||||
export async function getGitInfo() {
|
||||
const branch = gitBranch || await git.revparse(['--abbrev-ref', 'HEAD'])
|
||||
const commit = await git.revparse(['HEAD'])
|
||||
const shortCommit = await git.revparse(['--short=7', 'HEAD'])
|
||||
return { branch, commit, shortCommit }
|
||||
}
|
||||
|
||||
export const getEnv = async () => {
|
||||
export async function getEnv() {
|
||||
const { commit, shortCommit, branch } = await getGitInfo()
|
||||
const env = isDevelopment
|
||||
? 'dev'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue