Skip to content

Commit

Permalink
Merge pull request #323 from Difegue/dev
Browse files Browse the repository at this point in the history
LANraragi Hotfix 0.7.2
  • Loading branch information
Difegue authored Jul 26, 2020
2 parents 1585d6c + eca8575 commit fc1808f
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 37 deletions.
32 changes: 11 additions & 21 deletions .github/workflows/push-continous-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
steps:
- uses: actions/checkout@master
- name: Set up Docker Buildx
uses: crazy-max/ghaction-docker-buildx@v1.5.0
uses: crazy-max/ghaction-docker-buildx@v3.2.0
with:
buildx-version: v0.3.1
buildx-version: latest
qemu-version: latest
- uses: actions/cache@v1
- uses: actions/cache@v2
with:
path: /tmp/buildxcache
key: ${{ runner.os }}-docker-buildx-${{ hashFiles('**') }}
key: ${{ runner.os }}-docker-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-docker-buildx-
- name: Docker Login
Expand All @@ -30,23 +30,13 @@ jobs:
- name: Build/Push Nightly Docker
run: |
if [ -f /tmp/buildxcache/index.json ]; then
echo "Using buildx cache!"
docker buildx build --pull \
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x \
--output "type=image,push=true" \
--tag difegue/lanraragi:nightly \
--cache-from=type=local,src=/tmp/buildxcache \
--cache-to=type=local,dest=/tmp/buildxcache \
--file ./tools/build/docker/Dockerfile .
else
docker buildx build --pull \
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x \
--output "type=image,push=true" \
--tag difegue/lanraragi:nightly \
--cache-to=type=local,dest=/tmp/buildxcache \
--file ./tools/build/docker/Dockerfile .
fi
docker buildx build \
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x \
--output "type=image,push=true" \
--tag difegue/lanraragi:nightly \
--cache-from "type=local,src=/tmp/buildxcache" \
--cache-to "type=local,dest=/tmp/buildxcache" \
--file ./tools/build/docker/Dockerfile .
exportDockerRootFS:
name: Build and export Docker rootfs for Windows build
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/release-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,29 @@ jobs:
steps:
- uses: actions/checkout@master
- name: Set up Docker Buildx
uses: crazy-max/ghaction-docker-buildx@v1.5.0
uses: crazy-max/ghaction-docker-buildx@v3.2.0
with:
buildx-version: v0.3.1
buildx-version: latest
qemu-version: latest
- uses: actions/cache@v2
with:
path: /tmp/buildxcache
key: ${{ runner.os }}-docker-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-docker-buildx-
- name: Build/Push Latest Docker image and tag with Release number
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: |
TAG=${GITHUB_REF:10:10}
docker buildx build --pull \
docker buildx build \
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x \
--output "type=registry" \
--output "type=image,push=true" \
--tag difegue/lanraragi:latest \
--tag difegue/lanraragi:$TAG \
--cache-from "type=local,src=/tmp/buildxcache" \
--cache-to "type=local,dest=/tmp/buildxcache" \
--file ./tools/build/docker/Dockerfile .
- uses: Ilshidur/action-discord@master
env:
Expand Down
2 changes: 1 addition & 1 deletion lib/LANraragi/Utils/Routing.pm
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ sub apply_routes {
$public_api->get('/api/info')->to('api-other#serve_serverinfo');
$logged_in_api->get('/api/plugins/:type')->to('api-other#list_plugins');
$logged_in_api->post('/api/plugins/use')->to('api-other#use_plugin');
$logged_in_api->post('/api/plugin/use')->to('api-other#use_plugin');
$logged_in_api->post('/api/plugin/use')->to('api-other#use_plugin'); #old
$logged_in_api->delete('/api/tempfolder')->to('api-other#clean_tempfolder');

# Archive API (old)
Expand Down
1 change: 1 addition & 0 deletions lib/Shinobu.pm
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ use LANraragi::Utils::Generic qw(is_archive);
use LANraragi::Model::Config;
use LANraragi::Model::Plugins;
use LANraragi::Utils::Plugins; # Needed here since Shinobu doesn't inherit from the main LRR package
use LANraragi::Model::Search; # idem

# Filemap hash, global to all subs and exposed to the server through IPC
my %filemap;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lanraragi",
"version": "0.7.1",
"version_name": "Tonight",
"version": "0.7.2",
"version_name": "Neighborhood Threat",
"description": "holla where the chinese comics at",
"scripts": {
"test": "prove -l -v tests/*.t",
Expand Down
2 changes: 2 additions & 0 deletions public/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ function loadCategories() {
}

function encode(r) {
if (r === undefined)
return r;
if (Array.isArray(r))
return r[0].replace(/[\x26\x0A\<>'"]/g, function (r) { return "&#" + r.charCodeAt(0) + ";" });
else
Expand Down
6 changes: 3 additions & 3 deletions public/js/index_datatables.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function titleColumnDisplay(data, type, full, meta) {
titleHtml += buildProgressDiv(data.arcid, data.isnew);

return `${titleHtml}
<a class="image-tooltip" id="${data.arcid} style="cursor:pointer"
<a class="image-tooltip" id="${data.arcid}" style="cursor:pointer"
onmouseover="buildImageTooltip($(this))" onclick="openInNewTab('reader?id=${data.arcid}')">
${encode(data.title)}
</a>
Expand Down Expand Up @@ -185,7 +185,7 @@ function buildThumbDiv(row, data, index) {
</div>
<div style="height:280px; cursor:pointer" class="id3" >
<a onclick="openInNewTab('reader?id=${data.arcid}')" title="${encode(data.title)}">
<img style="position:relative;" id ="${data.arcid}_thumb" src="./img/wait_warmly.jpg"/>
<img style="position:relative;" id="${data.arcid}_thumb" src="./img/wait_warmly.jpg"/>
<i id="${data.arcid}_spinner" class="fa fa-4x fa-cog fa-spin ttspinner"></i>
<img src="./api/archives/${data.arcid}/thumbnail"
onload="$('#${data.arcid}_thumb').remove(); $('#${data.arcid}_spinner').remove();"
Expand Down Expand Up @@ -339,7 +339,7 @@ function splitTagsByNamespace(tags) {

var tagsByNamespace = {};

if (tags === null) {
if (tags === null || tags === undefined) {
return tagsByNamespace;
}

Expand Down
19 changes: 13 additions & 6 deletions tools/build/homebrew/Lanraragi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
class Lanraragi < Formula
desc "Web application for archival and reading of manga/doujinshi"
homepage "https://github.com/Difegue/LANraragi"
# url "https://github.com/Difegue/LANraragi/archive/v.0.7.0.tar.gz"
# sha256 "e0ba954c80e6c2c16994e52b310234b3ee013c7076797c5d9eaf216bda182af6"
# url "https://github.com/Difegue/LANraragi/archive/v.0.7.1.tar.gz"
# sha256 "bfef465abb30f2ff18cda2fea6712f5ff35b3d23b0d6f2e7ea4cfe1c46e69585"
license "MIT"
url "https://github.com/Difegue/LANraragi.git",
:revision => "COMMIT_HASH"
version "0.1994-dev"
Expand Down Expand Up @@ -93,9 +94,15 @@ def caveats
end

test do
ENV["PERL5LIB"] = libexec/"lib/perl5"
ENV["LRR_LOG_DIRECTORY"] = testpath/"log"

system "npm", "--prefix", libexec, "test"
# This can't have its _user-facing_ functionality tested in the `brew test`
# environment because it needs Redis. It fails spectacularly tho with some
# table flip emoji. So let's use those to confirm _some_ functionality.
output = <<~EOS
キタ━━━━━━(゚∀゚)━━━━━━!!!!!
(╯・_>・)╯︵ ┻━┻
It appears your Redis database is currently not running.
The program will cease functioning now.
EOS
assert_match output, shell_output("#{bin}/lanraragi", 1)
end
end

0 comments on commit fc1808f

Please sign in to comment.