Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

Commit

Permalink
Merge pull request #50 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 4.4.0
  • Loading branch information
andyone authored Jun 30, 2021
2 parents fa53d1f + 4acfa27 commit 2431fd3
Show file tree
Hide file tree
Showing 15 changed files with 105 additions and 46 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,54 @@ jobs:
env:
IMAGE: essentialkaos/perfecto:micro
run: ./perfecto-docker common/pkgre.spec

Aligo:
name: Aligo
runs-on: ubuntu-latest

needs: Go

env:
SRC_DIR: src/github.com/${{ github.repository }}
GO111MODULE: auto

steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.16.x'
id: go

- name: Setup PATH
run: |
echo "GOPATH=${{ github.workspace }}" >> "$GITHUB_ENV"
echo "GOBIN=${{ github.workspace }}/bin" >> "$GITHUB_ENV"
echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Checkout
uses: actions/checkout@v2
with:
path: ${{env.SRC_DIR}}

- name: Install deps
run: |
mkdir -p $GOBIN
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- name: Download dependencies
working-directory: ${{env.SRC_DIR}}
run: make deps

- name: Install Aligo
working-directory: ${{env.SRC_DIR}}
run: |
wget https://apps.kaos.st/aligo/latest/linux/x86_64/aligo
chmod +x aligo
- name: Print Aligo version info
working-directory: ${{env.SRC_DIR}}
run: ./aligo --version

- name: Check Go structs alignment info
working-directory: ${{env.SRC_DIR}}
run: ./aligo check ./...
5 changes: 1 addition & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
branches: [master]
schedule:
- cron: '0 17 * * 1,3,5'
- cron: '0 19 * * 1,3,5'

jobs:
analyse:
Expand All @@ -19,9 +19,6 @@ jobs:
with:
fetch-depth: 2

- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
Expand Down
34 changes: 17 additions & 17 deletions Gopkg.lock

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

8 changes: 4 additions & 4 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[[constraint]]
name = "github.com/valyala/fasthttp"
version = "1.18.0"
version = "1.27.0"

[[constraint]]
branch = "master"
name = "pkg.re/check.v1"
name = "pkg.re/essentialkaos/check.v1"
version = "1.0.0"

[[constraint]]
name = "pkg.re/essentialkaos/ek.v12"
version = "12.11.0"
version = "12.20.4"

[prune]
go-tests = true
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################

# This Makefile generated by GoMakeGen 1.3.0 using next command:
# This Makefile generated by GoMakeGen 1.3.2 using next command:
# gomakegen --dep --metalinter .
#
# More info: https://kaos.sh/gomakegen
Expand Down Expand Up @@ -64,6 +64,6 @@ help: ## Show this info
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| awk 'BEGIN {FS = ":.*?## "}; {printf " \033[33m%-16s\033[0m %s\n", $$1, $$2}'
@echo -e ''
@echo -e '\033[90mGenerated by GoMakeGen 1.3.0\033[0m\n'
@echo -e '\033[90mGenerated by GoMakeGen 1.3.2\033[0m\n'

################################################################################
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<p align="center"><img src="https://gh.kaos.st/pkgre.svg"/></p>

<p align="center">
<a href="https://github.com/essentialkaos/pkgre/actions"><img src="https://github.com/essentialkaos/pkgre/workflows/CI/badge.svg" alt="GitHub Actions Status" /></a>
<a href="https://github.com/essentialkaos/pkgre/actions?query=workflow%3ACodeQL"><img src="https://github.com/essentialkaos/pkgre/workflows/CodeQL/badge.svg" /></a>
<a href="https://goreportcard.com/report/github.com/essentialkaos/pkgre"><img src="https://goreportcard.com/badge/github.com/essentialkaos/pkgre" /></a>
<a href="https://codebeat.co/projects/github-com-essentialkaos-pkgre-master"><img alt="codebeat badge" src="https://codebeat.co/badges/f29ed07b-af32-4d45-a342-59b20e3bfcf9" /></a>
<a href="https://kaos.sh/w/pkgre/ci"><img src="https://kaos.sh/w/pkgre/ci.svg" alt="GitHub Actions CI Status" /></a>
<a href="https://kaos.sh/w/pkgre/codeql"><img src="https://kaos.sh/w/pkgre/codeql.svg" alt="GitHub Actions CodeQL Status" /></a>
<a href="https://kaos.sh/r/pkgre"><img src="https://kaos.sh/r/pkgre.svg" alt="GoReportCard" /></a>
<a href="https://kaos.sh/b/pkgre"><img src="https://kaos.sh/b/f29ed07b-af32-4d45-a342-59b20e3bfcf9.svg" alt="Codebeat badge" /></a>
<a href="#license"><img src="https://gh.kaos.st/apache2.svg"></a>
</p>

<p align="center">
<a href="#"><img src="https://healthchecks.io/badge/6f454deb-5215-40aa-933f-f91a8e579a07/sKjRtflJ-2/server.svg" /></a>
<a href="#"><img src="https://healthchecks.io/badge/6f454deb-5215-40aa-933f-f91a8e579a07/2FbciL3K-2/morpher.svg" /></a>
Expand Down
8 changes: 6 additions & 2 deletions common/pkgre.spec
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

Summary: pkg.re morpher server
Name: pkgre
Version: 4.3.0
Version: 4.4.0
Release: 0%{?dist}
Group: Applications/System
License: Apache License, Version 2.0
Expand All @@ -64,7 +64,7 @@ Source0: https://source.kaos.st/pkgre/%{name}-%{version}.tar.bz2

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: golang >= 1.14
BuildRequires: golang >= 1.16

Requires: systemd

Expand All @@ -87,6 +87,7 @@ pkg.re service morpher server.

%build
export GOPATH=$(pwd)
export GO111MODULE=auto

pushd src/github.com/essentialkaos/%{name}
%{__make} %{?_smp_mflags} all
Expand Down Expand Up @@ -153,6 +154,9 @@ rm -rf %{buildroot}
################################################################################

%changelog
* Tue Jun 29 2021 Anton Novojilov <[email protected]> - 4.4.0-0
- Dependencies updated to the latest versions

* Mon Dec 21 2020 Anton Novojilov <[email protected]> - 4.3.0-0
- Sending healthcheck requests

Expand Down
2 changes: 1 addition & 1 deletion morpher-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2020 ESSENTIAL KAOS //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion refs/fuzz.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package refs

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2020 ESSENTIAL KAOS //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion refs/refs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package refs

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2020 ESSENTIAL KAOS //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
4 changes: 2 additions & 2 deletions refs/refs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package refs

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2020 ESSENTIAL KAOS //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand All @@ -12,7 +12,7 @@ import (
"io/ioutil"
"testing"

. "pkg.re/check.v1"
. "pkg.re/essentialkaos/check.v1"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion repo/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package repo

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2020 ESSENTIAL KAOS //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion server/healthcheck/healthcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package healthcheck

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2020 ESSENTIAL KAOS //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
14 changes: 10 additions & 4 deletions server/morpher/morpher.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package morpher

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2020 ESSENTIAL KAOS //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down Expand Up @@ -45,11 +45,11 @@ const DOC_QUERY_ARG = "docs"

// PkgInfo is struct with package info
type PkgInfo struct {
Path string
TargetName string
RepoInfo *repo.Info
RefsInfo *refs.Info
Path string
TargetType refs.RefType
TargetName string
}

// Metrics is struct with metrics data
Expand Down Expand Up @@ -176,7 +176,13 @@ func requestHandler(ctx *fasthttp.RequestCtx) {
}

targetType, targetName := suggestHead(repoInfo, refsInfo)
pkgInfo := &PkgInfo{repoInfo, refsInfo, path, targetType, targetName}
pkgInfo := &PkgInfo{
RepoInfo: repoInfo,
RefsInfo: refsInfo,
Path: path,
TargetType: targetType,
TargetName: targetName,
}

// Rewrite refs
if repoInfo.Path == "info/refs" {
Expand Down
4 changes: 2 additions & 2 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package server

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2020 ESSENTIAL KAOS //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down Expand Up @@ -33,7 +33,7 @@ import (
// Application info
const (
APP = "PkgRE Morpher Server"
VER = "4.3.0"
VER = "4.4.0"
DESC = "HTTP Server for morphing go get requests"
)

Expand Down

0 comments on commit 2431fd3

Please sign in to comment.