Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
ruibaby committed Feb 6, 2024
2 parents d8a1c77 + 2cf19a4 commit 435807b
Show file tree
Hide file tree
Showing 1,011 changed files with 76 additions and 23 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/halo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ jobs:
- uses: actions/checkout@v3
- name: Setup Environment
uses: ./.github/actions/setup-env
- name: Check Halo console
run: make -C console check
- name: Check Halo core
- name: Check Halo
run: ./gradlew check
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
Expand All @@ -42,8 +40,6 @@ jobs:
- uses: actions/checkout@v3
- name: Setup Environment
uses: ./.github/actions/setup-env
- name: Build Halo console
run: make -C console build
- name: Reset version of Halo
if: github.event_name == 'release'
shell: bash
Expand All @@ -52,7 +48,7 @@ jobs:
version=${{ github.event.release.tag_name }}
version=${version#v}
sed -i "s/version=.*-SNAPSHOT$/version=$version/1" gradle.properties
- name: Build Halo core
- name: Build Halo
run: ./gradlew clean && ./gradlew downloadPluginPresets && ./gradlew build -x check
- name: Upload Artifacts
uses: actions/upload-artifact@v4
Expand Down
8 changes: 8 additions & 0 deletions application/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ tasks.register('createChecksums', Checksum) {
checksumAlgorithm = Checksum.Algorithm.SHA256
}

tasks.named('processResources', ProcessResources) {
from project(':ui').layout.buildDirectory.dir('dist')
into layout.buildDirectory.dir('resources/main')
configure {
mustRunAfter project(':ui').tasks.named('build')
}
}

tasks.named('build') {
dependsOn tasks.named('createChecksums')
}
Expand Down
13 changes: 0 additions & 13 deletions build.gradle

This file was deleted.

2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ pluginManagement {
}

rootProject.name = 'halo'
include 'api', 'application', 'platform:application', 'platform:plugin'
include 'api', 'application', 'platform:application', 'platform:plugin', 'ui'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
60 changes: 60 additions & 0 deletions ui/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
plugins {
id "com.github.node-gradle.node" version "7.0.1"
}

tasks.register('clean', Delete) {
delete layout.buildDirectory
delete fileTree('packages') {
include '*/dist/**'
}
}

tasks.register('build', PnpmTask) {
dependsOn tasks.named('check'), tasks.named('buildPackages')
pnpmCommand = ['run', 'build']
inputs.files(fileTree(layout.projectDirectory) {
include 'console-src/**', 'uc-src/**', 'src/**', 'public/**', '*.js', '*.json', '*.yaml', 'index.html'
exclude '**/node_modules/**', '**/build/**', '**/dist/**'
})
outputs.dir(layout.buildDirectory.dir('dist'))
configure {
shouldRunAfter tasks.named('clean')
}
}

tasks.register('buildPackages', PnpmTask) {
dependsOn tasks.named('pnpmInstall')
inputs.files(fileTree('packages') {
exclude '**/node_modules/**', '**/dist/**'
})
inputs.file('package.json')
pnpmCommand = ['run', 'build:packages']
outputs.files(fileTree('packages') {
include '*/dist/**'
})
}

tasks.register('test', PnpmTask) {
dependsOn tasks.named('buildPackages')
pnpmCommand = ['run', 'test:unit']
shouldRunAfter tasks.named('lint'), tasks.named('typecheck')
}

tasks.register('lint', PnpmTask) {
dependsOn tasks.named('buildPackages')
pnpmCommand = ['run', 'lint']
}

tasks.register('typecheck', PnpmTask) {
dependsOn tasks.named('buildPackages')
pnpmCommand = ['run', 'typecheck']
}

tasks.register('check') {
dependsOn tasks.named('lint'), tasks.named('typecheck'), tasks.named('test')
}

tasks.register('dev', PnpmTask) {
dependsOn tasks.named('buildPackages')
pnpmCommand = ['run', 'dev']
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion console/package.json → ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test:e2e": "start-server-and-test preview http://127.0.0.1:5050/ 'cypress open'",
"test:e2e:ci": "start-server-and-test preview http://127.0.0.1:5050/ 'cypress run'",
"typecheck": "vue-tsc --noEmit -p tsconfig.app.json --composite false && pnpm run typecheck:packages",
"lint": "eslint './src' './console-src' './uc-src' --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --ignore-path .gitignore --max-warnings=0 && pnpm run lint:packages",
"lint": "eslint './src' './console-src' './uc-src' --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --ignore-path .gitignore --max-warnings=0 -f html -o build/lint-result/index.html && pnpm run lint:packages",
"prettier": "prettier --write './{src,uc-src,console-src}/**/*.{vue,js,jsx,ts,tsx,css,scss,json,yml,yaml,html}' && pnpm run prettier:packages",
"typecheck:packages": "pnpm --parallel --filter \"./packages/**\" run typecheck",
"lint:packages": "pnpm --parallel --filter \"./packages/**\" lint",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 435807b

Please sign in to comment.