Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ruibaby committed May 11, 2019
2 parents 3a502db + 9891bdb commit f137d3a
Show file tree
Hide file tree
Showing 113 changed files with 89 additions and 274 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,4 @@ nbdist/
*.rar

### VSCode
.vscode

.vscode
24 changes: 18 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,33 @@ jobs:
script: ./gradlew check
- stage: build
script: ./gradlew build -x test
- stage: build-docker-image-for-release
- stage: Build Docker Image for Release
script: ./scripts/docker-build-release.sh
- stage: build-docker-image-for-dev
- stage: Build Docker Image for Dev
script: ./scripts/docker-build-dev.sh
- stage: GitHub Release
script: echo "Deploying to GitHub releases ..." && pwd
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
file_glob: true
file: $TRAVIS_BUILD_DIR/build/libs/*
skip_cleanup: true
on:
tags: true
stages:
- test
- build
- name: build-docker-image-for-release
if: tag IS present
- name: build-docker-image-for-dev
if: branch = dev
- GitHub Release
- name: Build Docker Image for Release
if: tag =~ /^v\d+\.\d+(\.\d+)?(-release)?$/
- name: Build Docker Image for Dev
if: tag =~ /^v\d+\.\d+(\.\d+)?-(beta|alpha)+(\.\d+)?$/
branches:
only:
- master
- dev
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
notifications:
webhooks:
- https://fathomless-fjord-24024.herokuapp.com/notify
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM openjdk:8-jdk-alpine

VOLUME /tmp

ARG JAR_FILE=build/libs/halo-1.0.0.beta.jar
ARG JAR_FILE=build/libs/halo.jar
ARG PORT=8090
ARG TIME_ZONE=Asia/Shanghai

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<p align="center">
<a href="https://ryanc.cc"><img alt="Author" src="https://img.shields.io/badge/author-ruibaby-red.svg?style=flat-square"/></a>
<a href="#"><img alt="JDK" src="https://img.shields.io/badge/JDK-1.8-yellow.svg?style=flat-square"/></a>
<a href="https://github.com/ruibaby/halo/releases"><img alt="GitHub release" src="https://img.shields.io/github/release/ruibaby/halo.svg?style=flat-square"/></a>
<a href="https://travis-ci.org/ruibaby/halo"><img alt="Travis CI" src="https://img.shields.io/travis/ruibaby/halo.svg?style=flat-square"/></a>
<a href="https://hub.docker.com/r/ruibaby/halo/"><img alt="Docker Build Status" src="https://img.shields.io/docker/build/ruibaby/halo.svg?style=flat-square"/></a>
<a href="https://github.com/halo-dev/halo/releases"><img alt="GitHub release" src="https://img.shields.io/github/release/halo-dev/halo.svg?style=flat-square"/></a>
<a href="https://travis-ci.org/halo-dev/halo"><img alt="Travis CI" src="https://img.shields.io/travis/halo-dev/halo.svg?style=flat-square"/></a>
<a href="https://hub.docker.com/r/halo-dev/halo/"><img alt="Docker Build Status" src="https://img.shields.io/docker/build/halo-dev/halo.svg?style=flat-square"/></a>
</p>

------------------------------
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ apply plugin: 'io.spring.dependency-management'

group = 'run.halo.app'
archivesBaseName = 'halo'
version = '1.0.0.beta'
version = '1.0.0-beta.3'
sourceCompatibility = '1.8'
description = 'Halo, personal blog system developed in Java.'

Expand Down
12 changes: 0 additions & 12 deletions hooks/pre_build

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/docker-build-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ VERSION=$(ls build/libs | sed 's/.*halo-//' | sed 's/.jar$//')
echo "Halo version: $VERSION"

echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker build -t $DOCKER_USERNAME/halo:latest-dev -t $DOCKER_USERNAME/halo:$VERSION.dev .
docker build --build-arg JAR_FILE="build/libs/halo-$VERSION.jar" -t $DOCKER_USERNAME/halo:latest-dev -t $DOCKER_USERNAME/halo:$VERSION.dev .
docker images
docker push $DOCKER_USERNAME/halo
2 changes: 1 addition & 1 deletion scripts/docker-build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ VERSION=$(ls build/libs | sed 's/.*halo-//' | sed 's/.jar$//')
echo "Halo version: $VERSION"

echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker build -t $DOCKER_USERNAME/halo -t $DOCKER_USERNAME/$VERSION .
docker build --build-arg JAR_FILE=build/libs/halo-$VERSION.jar -t $DOCKER_USERNAME/halo -t $DOCKER_USERNAME/$VERSION .
docker images
docker push $DOCKER_USERNAME/halo
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ public void handleCommentNewEvent(CommentNewEvent newEvent) {
// Get postComment id
PostComment postComment = postCommentService.getById(newEvent.getCommentId());

log.debug("Got post comment: [{}]", postComment);

Post post = postService.getById(postComment.getPostId());

StrBuilder url = new StrBuilder(optionService.getBlogBaseUrl())
Expand All @@ -86,6 +88,8 @@ public void handleCommentNewEvent(CommentNewEvent newEvent) {
} else if (newEvent.getSource() instanceof SheetService) {
SheetComment sheetComment = sheetCommentService.getById(newEvent.getCommentId());

log.debug("Got sheet comment: [{}]", sheetComment);

Sheet sheet = sheetService.getById(sheetComment.getPostId());

StrBuilder url = new StrBuilder(optionService.getBlogBaseUrl())
Expand All @@ -98,6 +102,8 @@ public void handleCommentNewEvent(CommentNewEvent newEvent) {
} else if (newEvent.getSource() instanceof JournalService) {
JournalComment journalComment = journalCommentService.getById(newEvent.getCommentId());

log.debug("Got journal comment: [{}]", journalComment);

Journal journal = journalService.getById(journalComment.getPostId());

StrBuilder url = new StrBuilder(optionService.getBlogBaseUrl())
Expand Down Expand Up @@ -133,7 +139,7 @@ public void handleCommentReplyEvent(CommentReplyEvent replyEvent) {

Map<String, Object> data = new HashMap<>();

log.debug("replyEvent.getSource():"+replyEvent.getSource().toString());
log.debug("replyEvent.getSource():" + replyEvent.getSource().toString());

if (replyEvent.getSource() instanceof PostCommentService) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public FreemarkerConfigAwareListener(OptionService optionService,
this.userService = userService;
}

@Async
@EventListener
@Order(Ordered.HIGHEST_PRECEDENCE + 1)
public void onApplicationStartedEvent(ApplicationStartedEvent applicationStartedEvent) throws TemplateModelException {
Expand All @@ -60,23 +59,20 @@ public void onApplicationStartedEvent(ApplicationStartedEvent applicationStarted
loadUserConfig();
}

@Async
@EventListener
public void onThemeActivatedEvent(ThemeActivatedEvent themeActivatedEvent) throws TemplateModelException {
log.debug("Received theme activated event");

loadThemeConfig();
}

@Async
@EventListener
public void onUserUpdate(UserUpdatedEvent event) throws TemplateModelException {
log.debug("Received user updated event, user id: [{}]", event.getUserId());

loadUserConfig();
}

@Async
@EventListener
public void onOptionUpdate(OptionUpdatedEvent event) throws TemplateModelException {
log.debug("Received option updated event");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ public ThemeUpdatedListener(StringCacheStore cacheStore) {
this.cacheStore = cacheStore;
}

@Async
@EventListener
public void onApplicationEvent(ThemeUpdatedEvent event) {
cacheStore.delete(ThemeService.THEMES_CACHE_KEY);
}

@Async
@EventListener
public void onOptionUpdatedEvent(OptionUpdatedEvent optionUpdatedEvent) {
cacheStore.delete(ThemeService.THEMES_CACHE_KEY);
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/admin/config.json

This file was deleted.

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/main/resources/admin/css/app.d4a9b439.css

This file was deleted.

1 change: 0 additions & 1 deletion src/main/resources/admin/css/app.e3f1af50.css

This file was deleted.

1 change: 0 additions & 1 deletion src/main/resources/admin/css/chunk-064cfe12.b2814feb.css

This file was deleted.

1 change: 0 additions & 1 deletion src/main/resources/admin/css/chunk-0e9a1aaa.02508ef3.css

This file was deleted.

1 change: 0 additions & 1 deletion src/main/resources/admin/css/chunk-1842ae66.b6783003.css

This file was deleted.

1 change: 1 addition & 0 deletions src/main/resources/admin/css/chunk-1a112dee.45475c5a.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/main/resources/admin/css/chunk-2292601a.3796d963.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/main/resources/admin/css/chunk-237b75e4.648f80ca.css

This file was deleted.

1 change: 1 addition & 0 deletions src/main/resources/admin/css/chunk-326c9cc0.f3d819ff.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/main/resources/admin/css/chunk-34ed76cc.83f70656.css

This file was deleted.

1 change: 0 additions & 1 deletion src/main/resources/admin/css/chunk-38995698.8b73819d.css

This file was deleted.

1 change: 0 additions & 1 deletion src/main/resources/admin/css/chunk-3b1aebf0.8481e8b4.css

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/main/resources/admin/css/chunk-559c36ba.c1990d7c.css

This file was deleted.

1 change: 0 additions & 1 deletion src/main/resources/admin/css/chunk-5cf64070.e190fb28.css

This file was deleted.

1 change: 0 additions & 1 deletion src/main/resources/admin/css/chunk-600e260e.f2a1ab27.css

This file was deleted.

1 change: 0 additions & 1 deletion src/main/resources/admin/css/chunk-66751b1c.19d096da.css

This file was deleted.

Loading

0 comments on commit f137d3a

Please sign in to comment.