Skip to content

Commit

Permalink
Merge pull request #81 from nanmu42/vendor-bump
Browse files Browse the repository at this point in the history
Fix frontend build and bump vendor versions
  • Loading branch information
nanmu42 authored Jul 7, 2023
2 parents 8b748ee + e79361c commit 9688979
Show file tree
Hide file tree
Showing 13 changed files with 2,405 additions and 15,713 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,29 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2

- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Check out code
uses: actions/checkout@v3

- name: Get dependencies
run: go get
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 16.15.1

- name: Build Frontend
run: make frontend

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.x

- name: Get dependencies
run: go get ./...

- name: Build Backend
run: make rly

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
70 changes: 0 additions & 70 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Build, tag, and push
env:
DOCKER_HUB_REPO: nanmu42/orly
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/lint.yml

This file was deleted.

6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM golang:alpine3.11 as golang
RUN apk --no-cache add make git tar tzdata ca-certificates nodejs yarn wget
FROM golang:alpine3.17 as golang
RUN apk --no-cache add make git tar tzdata ca-certificates nodejs=16.15.1 yarn wget
WORKDIR /app
COPY . .
RUN mkdir -p assets && \
Expand All @@ -8,7 +8,7 @@ RUN mkdir -p assets && \
wget -nc https://github.com/nanmu42/orly/releases/download/1.1.0-beta/fonts.tar.xz
RUN make all

FROM alpine:3.11
FROM alpine:3.17
# Maintainer Info
LABEL maintainer="nanmu42<[email protected]>"
# Dependencies
Expand Down
10 changes: 5 additions & 5 deletions coverimage/downloader.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build downloader
// +build downloader

/*
Expand All @@ -18,7 +19,6 @@ import (
"bufio"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"os"
Expand Down Expand Up @@ -74,9 +74,9 @@ func main() {
}

func readDir() (downloaded *sync.Map, err error) {
files, err := ioutil.ReadDir(".")
files, err := os.ReadDir(".")
if err != nil {
err = errors.Wrap(err, "ioutil.ReadDir")
err = errors.Wrap(err, "os.ReadDir")
return
}

Expand All @@ -91,9 +91,9 @@ func readDir() (downloaded *sync.Map, err error) {
}

func readList(fileName string) (URLs []string, err error) {
content, err := ioutil.ReadFile(fileName)
content, err := os.ReadFile(fileName)
if err != nil {
err = errors.Wrap(err, "ioutil.ReadFile")
err = errors.Wrap(err, "os.ReadFile")
return
}
// list is divided by return
Expand Down
6 changes: 3 additions & 3 deletions coverimage/thumbnail.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build thumbnail
// +build thumbnail

/*
Expand All @@ -16,7 +17,6 @@ import (
"image"
"image/draw"
"image/gif"
"io/ioutil"
"os"
"strings"

Expand Down Expand Up @@ -50,9 +50,9 @@ func main() {
return
}

info, err := ioutil.ReadDir(".")
info, err := os.ReadDir(".")
if err != nil {
err = errors.Wrap(err, "ioutil.ReadDir")
err = errors.Wrap(err, "os.ReadDir")
return
}

Expand Down
4 changes: 2 additions & 2 deletions fontloader.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package orly

import (
"io/ioutil"
"os"

"github.com/golang/freetype"
"github.com/golang/freetype/truetype"
Expand All @@ -10,7 +10,7 @@ import (

// LoadFont loads and parses font from file system
func LoadFont(fileName string) (loaded *truetype.Font, err error) {
fileBytes, err := ioutil.ReadFile(fileName)
fileBytes, err := os.ReadFile(fileName)
if err != nil {
err = errors.Wrap(err, "ReadFile")
return
Expand Down
Loading

0 comments on commit 9688979

Please sign in to comment.