Skip to content

Commit

Permalink
Deploy 0.5.1 (#209)
Browse files Browse the repository at this point in the history
* deploy

* deploy0.5.1
  • Loading branch information
jxnu-liguobin authored Sep 25, 2022
1 parent 38957d2 commit f439a7b
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 9 deletions.
2 changes: 2 additions & 0 deletions assembly-deploy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

sbt clean

sbt assembly

version=$1
Expand Down
1 change: 1 addition & 0 deletions modules/zim-server/src/main/resources/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ <h1> 注册 </h1>
url: "user/existEmail",
type: "POST",
dataType: "JSON",
contentType : "application/json",
data: JSON.stringify({email: $("#emailsignup").val()}),
success: function (data) {
if (data.data) {
Expand Down
3 changes: 2 additions & 1 deletion modules/zim-server/src/main/resources/static/js/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,9 @@ layui.use(['layim', 'jquery', 'laytpl'], function (layim) {
$.ajax({
url: "/user/updateSign",
dataType: "JSON",
contentType: "application/json",
type: "POST",
data: JSON.stringify({"sign": value}),
data: JSON.stringify({'sign': value}),
success: function (data) {
layer.msg(data.msg);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,10 @@ final class ZimUserApi(apiService: ApiService[RStream, Task])(implicit
onComplete(checkFuture) {
case scala.util.Success(u) if u != null =>
try {
val typ = if (`type` == "undefined") SystemConstant.FRIEND_TYPE else `type`
var pages: Option[Int] = None
Unsafe.unsafe { implicit runtime =>
val typ = if (`type` == "undefined") SystemConstant.FRIEND_TYPE else `type`
val pages: Option[Int] = Unsafe.unsafe { implicit runtime =>
// FIXME remove runHead
pages = Runtime.default.unsafe
Runtime.default.unsafe
.run(apiService.chatLogIndex(u.id, typ, id).runHead)
.getOrThrowFiberFailure()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ final class ApiServiceImpl(userService: UserService[RStream]) extends ApiService

override def chatLogIndex(id: Int, `type`: String, mid: Int): RStream[Int] =
userService
.countHistoryMessage(mid, id, `type`)
.countHistoryMessage(id, mid, `type`)
.map(count => calculatePages(count, SystemConstant.SYSTEM_PAGE))

override def chatLog(id: Int, `type`: String, page: Int, mid: Int): IO[Throwable, ResultPageSet[ChatHistory]] =
Expand Down
7 changes: 5 additions & 2 deletions native-packager-deploy.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#!/bin/bash


sbt clean

sbt universal:packageBin
# FIXME: To copy static file from prefix version.
version=$1
pre_version=$2

scp ~/Projects/zim/modules/zim-server/target/universal/zim-server-$version.zip root@your_ip:/home/zim/zim-server-$version.zip

ssh root@your_ip "ps -ef | grep -w java | grep -v grep | awk '{print $2}' | xargs kill -9; sleep 2; cd /home/zim; unzip -o zim-server-$version.zip; nohup ./zim-server-$version/bin/zim-server -Xms512M > zim.log 2>&1 &"

ssh root@your_ip "ps -ef | grep -w java | grep -v grep | awk '{print $2}' | xargs kill -9;"
ssh root@your_ip "cd /home/zim; unzip -o zim-server-$version.zip; nohup ./zim-server-$version/bin/zim-server -Xms512M > zim.log 2>&1 &"
# FIXME: Static files are in the service's current directory, and each deployment will use a new directory.
ssh root@your_ip "cp -r /home/zim/zim-server-$pre_version/bin/static/ /home/zim/zim-server-$version/bin/"
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ThisBuild / version := "0.5.0"
ThisBuild / version := "0.5.1"

0 comments on commit f439a7b

Please sign in to comment.