Skip to content

Commit

Permalink
Sync from Halo-dev (#10)
Browse files Browse the repository at this point in the history
* Create SECURITY.md (halo-dev#1144)

* doc: update swagger contact email. (halo-dev#1147)

* Update README.md

* feat: halo-dev#1103 (halo-dev#1173)

* feat: halo-dev#1174 (halo-dev#1177)

* feat: halo-dev#1158 (halo-dev#1176)

* Upgrade dependencies (halo-dev#1184)

* Update spring boot version and source compatibility version

* Rearrange some configs

* Upgrade swagger to 3.0.0

* Make swagger configurable

* Make swagger-ui.html path backward compatible

* Change jdk version into 11 in ci/cd scripts and Dockerfile

* chore: remove redis cache store (halo-dev#1190)

* chore: remove redis cache store.

* chore: remove redis cache store.

* chore: update build.gradle.

* Make more friendly error track (halo-dev#1191)

* Update gradle wrapper version to 6.6.1

* Upgrade h2 version to 1.4.197

* Make controller log more details

* Refactor FileHandler

* Fix image reader error

* fix: halo-dev#1200 (halo-dev#1207)

* feat: halo-dev#1160. (halo-dev#1203)

* fix: halo-dev#1180 (halo-dev#1209)

* feat: halo-dev#766 (halo-dev#1210)

* feat: add api for markdown export (halo-dev#1199)

* add API for markdown-export

* add front-matter support

* optimize fileName for markdown-export

* fornt-matter与正文中间增加换行符

* Replace travis ci with github action (halo-dev#1212)

* 1196 refactor/ci (#3)

* Remove .travis.yml

* Refactor github action partially

* Fix yaml syntax error

* Add run command for every step

* Set current branch name into halo.yml temporarily

* Test validation.yml

* Add upload-release-asset step into release.yml

* Perfect release.yml

* Fix indent error

* Refactor on condition in release.yml

* Refactor on condition in validation.yml

* Fix release.yml

* Fix upload_url value set

* Fix environment set error

* Change artifact variable from output into global environment

* Fix deprecated environment set method

* Fix environment variable set error

* Change assert_content_type with application/zip

* Refactor upload release step

* Fix release id set

* Fix release id set again

* Fix syntax error

* Refactor upload process

* Refactor halo ci

* Make build step rely on check step

* Inspect docker action

* Inspect docker action again

* Refine bootBuildImage config

* Refactor bootBuildImage config and halo ci

* Fix download artifact path error

* Fix docker image name concat error

* Remove downloaded files inspect tips

* perft: Reduce the scope of pointcut to make the package scope of tangent point as small as possible (halo-dev#1238)

* feat: support custom post password template. (halo-dev#1236)

* pref: clean unnecessary code. (halo-dev#1237)

* pref: clean unnecessary code.

* chore: change org.jetbrains.annotations.NotNull to org.springframework.lang.NonNull.

* Refactor checkstyle (halo-dev#1241)

* Refactor checkstyle.xml and add .editorconfig

* Optimized imports

* Rearrange codes

* Fix check sytle error in source codes

* Reformat test codes

* Fix check style error in test codes

* Config checkstyle plugin

* Fix merge conflicts

* fix: halo-dev#1214. (halo-dev#1242)

* release: 1.4.3-beta.1.

* release: 1.4.3-beta.2.

* Update README.md

* Fix theme updation error (halo-dev#1217)

* Make rest controller loggable

* Refactor pull from git process

* Replace Callback interface with Consumer

* Tag theme fetch apis and services deprecated

* Add getAllBranchesTest

* Refactor theme fetcher partially

* Refactor theme property scanner

* Add ThemeFetcherComposite

* Add InputStreamThemeFetcher

* Accomplish multipart zip file theme fetcher

* Reformat ThemeServiceImpl

* Reformat codes

* Provide ThemeRepository

* Complete MultipartFileThemeUpdater

* Make CommonsMultipartResolver support put request method

* Replace some methods with ThemeRepository

* Add GitThemeUpdater

* Add merge two local repo test

* Refine merge process with two repos

* Add more test entry point in GitTest

* Add shutdown hook after creating temporary directory

* Add test: find commit by tag

* Refactor git clone process in GitThemeFetcher

* Refine merge process of two repo

* Make sure that RevWalk closed

* Fix FileUtils#findRootPath bug

* Add clean task before gradle check

* Add fallback theme fetcher

* Disable logback-test.xml

* Set testLogging.showStandardStreams with true

* Fix test error while missing halo-test folder

* Enhance git theme fetcher

* Add copy hidden folder test

* Refine GitThemeFetcherTest

* Accomplish GitThemeUpdater

* Accomplish theme update

* Fix checkstyle error

* Add more deprecated details

* Refactor Dockerfile with layered jar (halo-dev#1248)

* Refactor Dockerfile with layered jar

* Add projectVersion print task

* Refactor docker build process

* Remove aliyun maven mirror

* Correct multi platforms list

* Correct multi platforms list again

* Make docker platforms configurable

* Fix folder copy error: ProviderMismatchException (halo-dev#1249)

* fix: unable to access custom sheet. (halo-dev#1246)

* release: 1.4.3-beta.2.

* doc: add document website. (halo-dev#1215)

* doc: add document website.

* doc: add document website.

* doc: add document website.

* release: 1.4.3.

* Update README.md

* Update README.md

* feat: halo-dev#1225 (halo-dev#1235)

* feat: halo-dev#1225

* fix: compatible with jdk1.8

* fix: format code

* fix: fix the problem that the status of the recycle bin file is incorrect when revocering

* fix: format code

* fix: format code

* fix: fix the post cannot be converted to recyling mode

* fix: post cannot be published on deleting the category password

* fix: fix jpa error

* fix: format code

* fix: encryption type extracted into enum

* fix: format code

* fix: format code

* fix: changes requested

* fix: format code

* fix: revert checkstyle.xml

* fix: change request

* fix: not encrypt 方法改为重载方法

* fix: 修复因调整 git 版本被回退的代码

Co-authored-by: xiangbei.yzx <[email protected]>

* fix: halo-dev#1255. (halo-dev#1256)

* fix: halo-dev#1255.

* fix: halo-dev#1255.

* release: 1.4.4.

* fix: category authentication redirect url. (halo-dev#1264)

* pref: journals likes api. (halo-dev#1266)

* pref: sitemap.xml (halo-dev#1267)

* release: 1.4.5.

* pref: grouping assertions (halo-dev#1273)

* Grouping assertions

Signed-off-by: Elvys Soares <[email protected]>

* Grouping assertions

Signed-off-by: Elvys Soares <[email protected]>

* Grouping assertions

Signed-off-by: Elvys Soares <[email protected]>

* fix: code style check.

Co-authored-by: Ryan Wang <[email protected]>

* Fix Page response model inconsistent in swagger ui (halo-dev#1277)

* Provide backup dto fetch api (halo-dev#1278)

* Fix swagger security reference config error

* Add backup dto fetch api

* Rearrange fetch api

* Fix incorrect cache lock of journal like api (halo-dev#1279)

* fix: fetch work dir backup api. (halo-dev#1282)

* feat: support import user. (halo-dev#1283)

* fix: theme update by upload. (halo-dev#1284)

* Cache current theme in theme repository (halo-dev#1286)

* pref: halo-dev#1050 (halo-dev#1287)

* Update FUNDING.yml

* pref: init default theme. (halo-dev#1297)

* feat: 扩展 freemarker 实现 block (halo-dev#1295)

* fix halo-dev#950 附件不存在时删除报错的问题

* pref: 扩展 freemarker 增加 block 功能

close halo-dev#1292

* checkStyle

* add unit test

* update test

* Upgrade spring boot version (halo-dev#1289)

* Update gradle wrapper version

* Update spring boot version to 2.5.0-M2

* Fix wrong const of temp_dir

* Refactor error controller

* Fix startup error due to theme not found

* Refine error controller handler

* Refine multipart resolver config

* Fix ThemeRepositoryImplTest error

* Fix freemarker not found error

* chore: change jetty to undertow.

* Remove useless throws

Co-authored-by: Ryan Wang <[email protected]>

* Make more tolerant of reading image (halo-dev#1298)

* Fix error for updating activated theme (halo-dev#1300)

* Fix error about response committed (halo-dev#1301)

* Add index page request test

* Add test for first page request

* Create session before requesting content

* chore: sync default theme. (halo-dev#1304)

* Refactor system configuration (halo-dev#1303)

* Refactor application*.yml

* Remove application-user.yaml

* Fix invalid config for aspect

* Remove random theme folder generation (halo-dev#1305)

* release: 1.4.6.

* feat: halo-dev#1313 (halo-dev#1315)

* release: 1.4.7-beta.1

* release: 1.4.7

* feat: add index page to sitemap.xml (halo-dev#1318)

* style: set the color of log to default after banner (halo-dev#1321)

* Upgrade to Spring Boot 2.5.0-M3 (halo-dev#1324)

* feat: enable swagger configuration in development. (halo-dev#1328)

* Automate attribute converter (halo-dev#1325)

* Deprecate AbstractConverter

* Remove unused enum and attribute converter

* Add AttributeConverterApplyTest

* Add JpaConfiguration

* Add AttributeConverterAutoGenerator

* Integrate automate-attribute-converter

* Rename JpaConfiguration

* Remove useless attribute converters

* Exclude property enums for auto-generating

* Refine JournalType definition

* Fix an error about existing injected type

* fix: halo-dev#1311 (halo-dev#1327)

* feat: halo-dev#1036 (halo-dev#1331)

* feat: halo-dev#1036

* revert: BaseCommentRepository.

* fix: incorrect number of children comment. (halo-dev#1332)

* feat: add gravatar source field for comment options api. (halo-dev#1333)

* chore: remove deprecated code. (halo-dev#1334)

* chore(deps): upgrade ali oss sdk dependency. (halo-dev#1335)

* revert: halo-dev#1297 (halo-dev#1343)

* pref: RSS/Atom (halo-dev#1342)

* 1.Add the lastBuildDate in RSS.
2.Add the updated in Atom.
3.Change the date format in RSS and Atom
4.Add the lastModified in the response header.

* fix code style

* Add OptionFilter for bulk option api (halo-dev#1345)

* Add OptionFilter for bulk option api

* Add another filter method for single option

* Restrict OptionController response

* Remove redundant api

* feat: complete private option keys.

* feat: complete private option keys.

Co-authored-by: Ryan Wang <[email protected]>

* release: 1.4.8

* doc: update readme.

* doc: update readme.

* fix: Returns the result in the content api for options getby (halo-dev#1353)

Co-authored-by: GalvinGao <[email protected]>
Co-authored-by: Ryan Wang <[email protected]>
Co-authored-by: John Niang <[email protected]>
Co-authored-by: Raremaa <[email protected]>
Co-authored-by: guqing <[email protected]>
Co-authored-by: zhixiangyuan <[email protected]>
Co-authored-by: xiangbei.yzx <[email protected]>
Co-authored-by: Elvys Soares <[email protected]>
Co-authored-by: Li <[email protected]>
Co-authored-by: 知雨 <[email protected]>
Co-authored-by: 肥鱼先生 <[email protected]>
Co-authored-by: Lay <[email protected]>
Co-authored-by: 扶醉 <[email protected]>
  • Loading branch information
14 people authored Apr 17, 2021
1 parent 269505a commit 8e52884
Show file tree
Hide file tree
Showing 450 changed files with 12,997 additions and 8,359 deletions.
510 changes: 510 additions & 0 deletions .editorconfig

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# These are supported funding model platforms

github:
patreon: halo_dev
patreon:
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
custom: ['https://afdian.net/@halo-dev','https://sponsor.halo.run']
custom: [ 'https://docs.halo.run/contribution/sponsor','https://sponsor.halo.run' ]
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ assignees: ''
- 我已经安装了最新版的 Halo
- 我已经搜索了已有的 Issues 列表中有关的信息
- 我已经搜索了论坛中有关的信息:https://bbs.halo.run
- 我已经阅读了 Halo 的 FAQ:https://halo.run/archives/other-faq
- 我已经阅读了 Halo 的 FAQ:https://docs.halo.run/user-guide/faq
-->

## 我的环境
Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/gradle.yml

This file was deleted.

194 changes: 194 additions & 0 deletions .github/workflows/halo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
name: Halo CI

on:
pull_request:
paths:
- '**'
- '!**.md'
push:
branches:
- '**'
paths:
- '**'
- '!**.md'
release:
types: # This configuration does not affect the page_build event above
- created

jobs:
check:
runs-on: ubuntu-latest
# Default steps
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Cache Gradle wrapper
id: cache-gradle-wrapper
uses: actions/[email protected]
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-dependencies-
- name: Cache Dependencies
id: cache-dependencies
uses: actions/[email protected]
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-dependencies-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-dependencies-
- name: Check And Test
run: ./gradlew check
build:
runs-on: ubuntu-latest
needs: check
if: github.event_name == 'release'
# Default steps
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Gradle wrapper
id: cache-gradle-wrapper
uses: actions/[email protected]
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-dependencies-
- name: Cache Dependencies
id: cache-dependencies
uses: actions/[email protected]
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-dependencies-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-dependencies-
- name: Build with Gradle
run: ./gradlew clean build -x test

- name: Archive halo jar
uses: actions/upload-artifact@v2
with:
name: halo-jar
path: build/libs
retention-days: 1
github-release:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'release'
steps:
- name: Download halo jar
uses: actions/download-artifact@v2
with:
name: halo-jar
path: build/libs
- name: Get Name of Artifact
id: get_artifact
run: |
ARTIFACT_PATHNAME=$(ls build/libs/*.jar | head -n 1)
ARTIFACT_NAME=$(basename ${ARTIFACT_PATHNAME})
echo "Artifact pathname: ${ARTIFACT_PATHNAME}"
echo "Artifact name: ${ARTIFACT_NAME}"
echo "ARTIFACT_PATHNAME=${ARTIFACT_PATHNAME}" >> $GITHUB_ENV
echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV
echo "RELEASE_ID=${{ github.event.release.id }}" >> $GITHUB_ENV
- name: Upload a Release Asset
uses: actions/github-script@v2
if: github.event_name == 'release'
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
console.log('environment', process.versions);
const fs = require('fs').promises;
const { repo: { owner, repo }, sha } = context;
console.log({ owner, repo, sha });
const releaseId = process.env.RELEASE_ID
const artifactPathName = process.env.ARTIFACT_PATHNAME
const artifactName = process.env.ARTIFACT_NAME
console.log('Releasing', releaseId, artifactPathName, artifactName)
await github.repos.uploadReleaseAsset({
owner, repo,
release_id: releaseId,
name: artifactName,
data: await fs.readFile(artifactPathName)
});
docker-release:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'release'
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Download halo jar
uses: actions/download-artifact@v2
with:
name: halo-jar
path: build/libs
- name: Cache Gradle wrapper
id: cache-gradle-wrapper
uses: actions/[email protected]
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-dependencies-
- name: Get version of halo
id: get_halo_version
run: |
version=$(./gradlew -q projectVersion)
echo "Trying to build and publish halo:${version}"
echo "HALO_VERSION=${version}" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
-
name: Build and push with version tag
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: ${{ secrets.DOCKER_PLATFORMS }}
push: true
tags: |
${{ secrets.DOCKER_IMAGE_NAME }}:${{ env.HALO_VERSION}}
- name: Build and push with latest tag
uses: docker/build-push-action@v2
if: "!github.event.release.prerelease"
with:
context: .
file: ./Dockerfile
platforms: ${{ secrets.DOCKER_PLATFORMS }}
push: true
tags: |
${{ secrets.DOCKER_IMAGE_NAME }}:latest
49 changes: 0 additions & 49 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 8e52884

Please sign in to comment.