Skip to content

Commit

Permalink
lintfix
Browse files Browse the repository at this point in the history
  • Loading branch information
d0rich committed Nov 6, 2023
1 parent 13a290f commit 168b2d0
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 14 deletions.
20 changes: 15 additions & 5 deletions apps/d0rich.me/ignore-build.mjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
import { execSync } from 'child_process'

const cachedCommitRef = process.env.CACHED_COMMIT_REF || 'd06423d365fa9cf3ef99a8653abbf1a83fe7d3bb'
const cachedCommitRef =
process.env.CACHED_COMMIT_REF || 'd06423d365fa9cf3ef99a8653abbf1a83fe7d3bb'
const commitRef = process.env.COMMIT_REF || 'HEAD'

const changesList = execSync(`git diff --name-only ${cachedCommitRef} ${commitRef}`).toString()
const changesList = execSync(
`git diff --name-only ${cachedCommitRef} ${commitRef}`
).toString()

const isD0richMeChanged = changesList.includes('apps/d0rich.me')
const isNuxtContentMermaidChanged = changesList.includes('packages/nuxt-content-mermaid')
const isNuxtDesignSystemChanged = changesList.includes('packages/nuxt-design-system')
const isNuxtContentMermaidChanged = changesList.includes(
'packages/nuxt-content-mermaid'
)
const isNuxtDesignSystemChanged = changesList.includes(
'packages/nuxt-design-system'
)

const ignoreBuild = !isD0richMeChanged && !isNuxtContentMermaidChanged && !isNuxtDesignSystemChanged
const ignoreBuild =
!isD0richMeChanged &&
!isNuxtContentMermaidChanged &&
!isNuxtDesignSystemChanged

process.exit(ignoreBuild ? 0 : 1)
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class GithubRepository {
return Promise.all(pagesPromises)
}

private async getRepoCoverImage(owner: string, repo: string, hash: string) {
private getRepoCoverImageUrl(owner: string, repo: string, hash: string) {
return `https://opengraph.githubassets.com/${hash}/${owner}/${repo}`
}

Expand Down
20 changes: 15 additions & 5 deletions apps/d0xigen.d0rich.me/ignore-build.mjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
import { execSync } from 'child_process'

const cachedCommitRef = process.env.CACHED_COMMIT_REF || 'd06423d365fa9cf3ef99a8653abbf1a83fe7d3bb'
const cachedCommitRef =
process.env.CACHED_COMMIT_REF || 'd06423d365fa9cf3ef99a8653abbf1a83fe7d3bb'
const commitRef = process.env.COMMIT_REF || 'HEAD'

const changesList = execSync(`git diff --name-only ${cachedCommitRef} ${commitRef}`).toString()
const changesList = execSync(
`git diff --name-only ${cachedCommitRef} ${commitRef}`
).toString()

const isD0xigenD0richMeChanged = changesList.includes('apps/d0xigen.d0rich.me')
const isNuxtContentMermaidChanged = changesList.includes('packages/nuxt-content-mermaid')
const isNuxtDesignSystemChanged = changesList.includes('packages/nuxt-design-system')
const isNuxtContentMermaidChanged = changesList.includes(
'packages/nuxt-content-mermaid'
)
const isNuxtDesignSystemChanged = changesList.includes(
'packages/nuxt-design-system'
)

const ignoreBuild = !isD0xigenD0richMeChanged && !isNuxtContentMermaidChanged && !isNuxtDesignSystemChanged
const ignoreBuild =
!isD0xigenD0richMeChanged &&
!isNuxtContentMermaidChanged &&
!isNuxtDesignSystemChanged

process.exit(ignoreBuild ? 0 : 1)
11 changes: 8 additions & 3 deletions apps/design.d0rich.me/ignore-build.mjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import { execSync } from 'child_process'

const cachedCommitRef = process.env.CACHED_COMMIT_REF || 'd06423d365fa9cf3ef99a8653abbf1a83fe7d3bb'
const cachedCommitRef =
process.env.CACHED_COMMIT_REF || 'd06423d365fa9cf3ef99a8653abbf1a83fe7d3bb'
const commitRef = process.env.COMMIT_REF || 'HEAD'

const changesList = execSync(`git diff --name-only ${cachedCommitRef} ${commitRef}`).toString()
const changesList = execSync(
`git diff --name-only ${cachedCommitRef} ${commitRef}`
).toString()

const isDesignD0richMeChanged = changesList.includes('apps/design.d0rich.me')
const isNuxtDesignSystemChanged = changesList.includes('packages/nuxt-design-system')
const isNuxtDesignSystemChanged = changesList.includes(
'packages/nuxt-design-system'
)

const ignoreBuild = !isDesignD0richMeChanged && !isNuxtDesignSystemChanged

Expand Down

0 comments on commit 168b2d0

Please sign in to comment.