Skip to content

Commit

Permalink
Release 0.14.0 (#52)
Browse files Browse the repository at this point in the history
* update github action dependencies
* go mod update, parser struct refactoring
* npm update and small migration for vis data
* update project to go 1.19
* update workflow actions
* change makefile logic, remove python from build ci action
* client: improve channel handling and sorting, upgrade dependencies, angular 17
* add deprecation logic to channels, go mod update
* add deprecation logic to channels, go mod update, build version
* ci: update node and golang versions
* ci: update node version to node 20 alone
* client: update dev dependencies for ci
  • Loading branch information
emschu authored Dec 27, 2023
1 parent 0ea5d01 commit 96dd934
Show file tree
Hide file tree
Showing 31 changed files with 4,047 additions and 3,233 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: OERC-Build

on:
pull_request:
push:
branches:
- main
tags:
- '*'

jobs:
oerc-build:
name: Project Build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ '20.x' ]
go-version: [ '1.20' ]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}

- name: Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Caching...
uses: actions/cache@v3
with:
path: |
~/.npm
client/node_modules
openapi-generator-cli.jar
key: ${{ runner.os }}-node-${{ hashFiles('client/package-lock.json') }}
restore-keys: |
${{ runner.os }}-cache-oerc
- name: npm install
run: |
cd client
npm install
- name: Build Go Codebase
run: make build

- name: Build Npm Codebase
run: make frontend
10 changes: 5 additions & 5 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ jobs:
python-version: [ '3.10' ]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: '1.20'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Caching...
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: |
~/.cache/pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/license.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
name: Check license headers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Check License Headers
uses: apache/skywalking-eyes@main
6 changes: 3 additions & 3 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
name: Code linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: '1.20'
- name: Linting
run: |
go install github.com/mgechev/revive@latest
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,28 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 16.x, 17.x, 18.x ]
python-version: [ '3.10' ]
go-version: [ 1.18, 1.19 ]
node-version: [ '20.x' ]
python-version: [ '3.11' ]
go-version: [ '1.20' ]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Caching...
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: |
~/.npm
Expand All @@ -49,7 +49,7 @@ jobs:
- name: Build Codebase
run: make setup

- name: npm install and npm run build
- name: npm install
run: |
cd client
npm install --omit=optional
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Build Artifacts
run: make release
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v1
uses: mikepenz/release-changelog-builder-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
Expand Down
7 changes: 7 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog oerc

## 0.14.0 - 2023/11/17
- go 1.20
- dependency update
- Add dynamic channel integration into UI, static sorting
- Channels can be deprecated now: Mechanism to add and deprecate channels in channel list
- Improve update handling of materialized view for fast status info

## 0.13.0 - 2023/08/12
- update dependencies
- Use new SRF JSON API instead of markup parsing, fixing fetch process for SRF
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# If not, see <https://www.gnu.org/licenses/>.

# Build
FROM golang:1.19-alpine as build
FROM golang:1.20-alpine as build
RUN mkdir /app
WORKDIR /app
COPY go.mod ./
Expand All @@ -27,7 +27,7 @@ COPY . ./project
RUN cd ./project && go build -o /app/oerc


FROM golang:1.19-alpine
FROM golang:1.20-alpine
MAINTAINER emschu <emschu@mailbox.org>
RUN mkdir /app && apk add --no-cache tzdata;
WORKDIR /app
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
# If not, see <https://www.gnu.org/licenses/>.
SHELL := /bin/bash

APP_VERSION_DOT = "0.13.0"
APP_VERSION_STR = "0-13-0"
APP_VERSION_DOT = "0.14.0"
APP_VERSION_STR = "0-14-0"

GO := GO111MODULE=on go
GO_PATH = $(shell $(GO) env GOPATH)
Expand All @@ -39,7 +39,7 @@ all: help

.PHONY: help
help: ## show this help
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
@grep -F -h "##" $(MAKEFILE_LIST) | grep -F -v grep | sed -e 's/\\$$//' | sed -e 's/##//'

.PHONY: clean
clean: ## clean up project
Expand All @@ -53,12 +53,11 @@ setup: ## install required project and (dev) dependencies
$(GO) get github.com/GeertJohan/go.rice/rice
$(GO) install github.com/mgechev/revive@latest
if [ ! -f openapi-generator-cli.jar ]; then curl -L -o openapi-generator-cli.jar -L https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/$(OPENAPI_TOOLS_VERSION)/openapi-generator-cli-$(OPENAPI_TOOLS_VERSION).jar; fi
pip install --user schemathesis
python -m pip install --user schemathesis

.PHONY: frontend
frontend: ## build the frontend and the static rice box file
cd client; npm run build-prod
$(GO_RICE) embed-go

.PHONY: build
build: ## build dev version of application
Expand Down Expand Up @@ -127,3 +126,4 @@ version: ## populate the current version defined in this make file
sed -r -i 's/"version": "([0-9]+.[0-9]+.[0-9]+)"/"version": "'$(APP_VERSION_DOT)'"/g' client/package.json
cd client; npm i;
make frontend
$(GO_RICE) embed-go
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ at `127.0.0.1:8080` (*default*) if you run `oerc server`.

- **Collecting TV program data** of 28 TV channels (`oerc fetch`)
- **Search for interesting program** items by looking for your own keywords (`oerc search`)
- Running an **HTTP backend server** to access program data in JSON format (`oerc server`)
- By default the server contains a small **client web application** for your browser to view the program data and
- Running an **HTTP server** to access program data in a simple Web-UI (`oerc server`)
- By default, the server contains a small **client web application** for your browser to view the program data and
your personal program recommendations

With the help of `oerc` you can build and use your own private TV program recommendation tool while ALL
Expand Down Expand Up @@ -47,6 +47,10 @@ regions in general.

# Setup & Run

## Download and start
Download the `oerc` binary from [here](https://github.com/emschu/oerc/releases) for your platform,
make it executable, and you are ready to start.

## With docker/docker-compose

Clone this repository, and build the binary file for the container:
Expand All @@ -63,7 +67,7 @@ $ docker-compose up

1. To get this application use one of the following commands

### Golang 1.18+
### Golang 1.20+
```shell
go install github.com/emschu/oerc@latest
```
Expand All @@ -88,7 +92,7 @@ USAGE:
oerc [global options] command [command options] [arguments...]
VERSION:
0.13.0, License: AGPLv3, https://github.com/emschu/oerc
0.14.0, License: AGPLv3, https://github.com/emschu/oerc
DESCRIPTION:
Fetch, view and search TV program data of public-law stations in Germany, Switzerland and Austria
Expand Down Expand Up @@ -157,7 +161,7 @@ ClientEnabled: true
# search settings
# only search for recommendations in the next 4 days
SearchDaysInFuture: 5
# these are example values. Feel free to create you own list of keywords :)
# these are example values. Feel free to create your own list of keywords :)
SearchKeywords:
- Loriot
# these channels won't be recognized during the "search" for recommendations based on your keywords
Expand Down
4 changes: 2 additions & 2 deletions ard.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ func (a *ARDParser) handleDay(channel Channel, day time.Time) {
// method to fetch all tv show data
func (a *ARDParser) fetchTVShows() {
if !appConf.EnableTVShowCollection || isRecentlyFetched() {
logRecentFetch("Skip update of ard tv shows")
a.logRecentFetch("Skip update of ard tv shows")
return
}
// Create a Collector specifically for Shopify
Expand Down Expand Up @@ -492,7 +492,7 @@ func (a *ARDParser) linkTagsToEntriesDaily(day time.Time) {
// method to link tags to program entries
func (a *ARDParser) linkTagsToEntriesGeneral() {
if isRecentlyFetched() {
logRecentFetch("Skip update of ard program entry tag search")
a.logRecentFetch("Skip update of ard program entry tag search")
return
}

Expand Down
Loading

0 comments on commit 96dd934

Please sign in to comment.