Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Spoje-NET/php-subreg
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.4
Choose a base ref
...
head repository: Spoje-NET/php-subreg
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 16 commits
  • 11 files changed
  • 2 contributors

Commits on Sep 12, 2019

  1. Delete config.json

    Vitexus authored Sep 12, 2019
    Copy the full SHA
    76db316 View commit details

Commits on Sep 17, 2019

  1. Scrutinizer config added

    Vitexus committed Sep 17, 2019
    Copy the full SHA
    149eb98 View commit details
  2. Scrutinizer config updated

    Vitexus committed Sep 17, 2019
    Copy the full SHA
    46f364e View commit details
  3. Unit tests config update

    Vitexus committed Sep 17, 2019
    Copy the full SHA
    28733a1 View commit details

Commits on Jun 10, 2020

  1. Copy the full SHA
    da3994c View commit details

Commits on Jun 22, 2020

  1. Wakatime badge added

    Vitexus authored Jun 22, 2020
    Copy the full SHA
    edaf1b3 View commit details

Commits on Jul 12, 2021

  1. dependencies update

    Vitexus authored Jul 12, 2021
    Copy the full SHA
    e8cc59b View commit details

Commits on Aug 30, 2021

  1. vendor renamed

    Vitexus committed Aug 30, 2021
    Copy the full SHA
    0abe51b View commit details
  2. Composer updated

    Vitexus committed Aug 30, 2021
    Copy the full SHA
    a6ae12c View commit details
  3. Merge pull request #1 from Spoje-NET/core-based

    Core based
    Vitexus authored Aug 30, 2021
    Copy the full SHA
    359cf1e View commit details
  4. there is no parent anymore

    Vitexus committed Aug 30, 2021
    Copy the full SHA
    dda76c2 View commit details

Commits on Aug 31, 2021

  1. Update for current ease-core

    Vitexus committed Aug 31, 2021
    Copy the full SHA
    fc1a5fb View commit details

Commits on Sep 1, 2021

  1. Prepare for Jenkins

    Vitexus committed Sep 1, 2021
    Copy the full SHA
    9b52996 View commit details
  2. Installation info updated

    Vitexus committed Sep 1, 2021
    Copy the full SHA
    a610f02 View commit details
  3. v1.0 release

    Vitexus committed Sep 1, 2021
    Copy the full SHA
    eb2b14f View commit details

Commits on Mar 28, 2024

  1. Coding standarts used

    Vitexus committed Mar 28, 2024
    Copy the full SHA
    0a1f55d View commit details
Showing with 259 additions and 43 deletions.
  1. +24 −0 .scrutinizer.yml
  2. +185 −0 Jenkinsfile
  3. +12 −0 Makefile
  4. +12 −10 README.md
  5. +5 −5 composer.json
  6. +0 −13 config.json
  7. +5 −1 debian/changelog
  8. +7 −1 debian/composer.json
  9. +3 −3 debian/control
  10. +5 −9 src/Subreg/Client.php
  11. +1 −1 tests/bootstrap.php
24 changes: 24 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
build:
nodes:
analysis:
environment:
php:
version: 7.2
project_setup:
override:
- 'true'
tests:
override:
- php-scrutinizer-run
-
command: phpcs-run
use_website_config: true
tests: true
filter:
excluded_paths:
- 'tests/*'
checks:
php: true
coding_style:
php: { }

185 changes: 185 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
#!groovy

// Docker images generated by https://github.com/VitexSoftware/BuildImages


pipeline {
agent none

options {
ansiColor('xterm')
copyArtifactPermission('*');
//disableConcurrentBuilds()
}

environment {
RED = '\\e[31m'
GREEN = '\\e[32m'
ENDCOLOR = '\\e[0m'
}

stages {

stage('debian-buster') {
agent {
docker { image 'vitexsoftware/debian:oldstable' }
}
steps {
dir('build/debian/package') {
checkout scm
buildPackage()
installPackages()
}
stash includes: 'dist/**', name: 'dist-buster'
}
post {
success {
archiveArtifacts 'dist/debian/'
copyArtifact()
}
}
}

stage('debian-bullseye') {
agent {
docker { image 'vitexsoftware/debian:stable' }
}
steps {
dir('build/debian/package') {
checkout scm
buildPackage()
installPackages()
}
stash includes: 'dist/**', name: 'dist-bullseye'
}
post {
success {
archiveArtifacts 'dist/debian/'
copyArtifact()
}
}
}

stage('debian-bookworm') {
agent {
docker { image 'vitexsoftware/debian:testing' }
}
steps {
dir('build/debian/package') {
checkout scm
buildPackage()
installPackages()
}
stash includes: 'dist/**', name: 'dist-bookworm'
}
post {
success {
archiveArtifacts 'dist/debian/'
copyArtifact()
}
}
}

stage('ubuntu-focal') {
agent {
docker { image 'vitexsoftware/ubuntu:stable' }
}
steps {
dir('build/debian/package') {
checkout scm
buildPackage()
installPackages()
}
stash includes: 'dist/**', name: 'dist-focal'
}
post {
success {
archiveArtifacts 'dist/debian/'
copyArtifact()
}
}
}

stage('ubuntu-hirsute') {
agent {
docker { image 'vitexsoftware/ubuntu:testing' }
}
steps {
dir('build/debian/package') {
checkout scm
buildPackage()
installPackages()
}
stash includes: 'dist/**', name: 'dist-hirsute'
}
post {
success {
archiveArtifacts 'dist/debian/'
copyArtifact()
}
}
}

}
}

def copyArtifact(){
step ([$class: 'CopyArtifact',
projectName: '${JOB_NAME}',
filter: "**/*.deb",
target: '/var/tmp/deb',
flatten: true,
selector: specific('${BUILD_NUMBER}')
]);
}

def buildPackage() {

def DIST = sh (
script: 'lsb_release -sc',
returnStdout: true
).trim()

def DISTRO = sh (
script: 'lsb_release -sd',
returnStdout: true
).trim()


def SOURCE = sh (
script: 'dpkg-parsechangelog --show-field Source',
returnStdout: true
).trim()

def VERSION = sh (
script: 'dpkg-parsechangelog --show-field Version',
returnStdout: true
).trim()

ansiColor('vga') {
echo '\033[42m\033[90mBuild debian package ' + SOURCE + ' v' + VERSION + ' for ' + DISTRO + '\033[0m'
}

def VER = VERSION + '~' + DIST + '~' + env.BUILD_NUMBER

//Buster problem: Can't continue: dpkg-parsechangelog is not new enough(needs to be at least 1.17.0)
//
// debianPbuilder additionalBuildResults: '',
// components: '',
// distribution: DIST,
// keyring: '',
// mirrorSite: 'http://deb.debian.org/debian/',
// pristineTarName: ''
sh 'dch -b -v ' + VER + ' "' + env.BUILD_TAG + '"'
sh 'sudo apt-get update'
sh 'debuild-pbuilder -i -us -uc -b'
sh 'mkdir -p $WORKSPACE/dist/debian/ ; rm -rf $WORKSPACE/dist/debian/* ; for deb in $(cat debian/files | awk \'{print $1}\'); do mv "../$deb" $WORKSPACE/dist/debian/; done'
}

def installPackages() {
sh 'cd $WORKSPACE/dist/debian/ ; dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz; cd $WORKSPACE'
sh 'echo "deb [trusted=yes] file:///$WORKSPACE/dist/debian/ ./" | sudo tee /etc/apt/sources.list.d/local.list'
sh 'sudo apt-get update'
sh 'echo "${GREEN} INSTALATION ${ENDCOLOR}"'
sh 'IFS="\n\b"; for package in `ls $WORKSPACE/dist/debian/ | grep .deb | awk -F_ \'{print \$1}\'` ; do echo -e "${GREEN} installing ${package} on `lsb_release -sc` ${ENDCOLOR} " ; sudo DEBIAN_FRONTEND=noninteractive DEBCONF_DEBUG=developer apt-get -y install $package ; done;'
}
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
repoversion=$(shell LANG=C aptitude show php-subreg | grep Version: | awk '{print $$2}')
nextversion=$(shell echo $(repoversion) | perl -ne 'chomp; print join(".", splice(@{[split/\./,$$_]}, 0, -1), map {++$$_} pop @{[split/\./,$$_]}), "\n";')


all: build install

fresh:
@@ -43,5 +47,13 @@ verup:
dimage:
docker build -t vitexsoftware/subreg .

release:
echo Release v$(nextversion)
dch -v $(nextversion) `git log -1 --pretty=%B | head -n 1`
debuild -i -us -uc -b
git commit -a -m "Release v$(nextversion)"
git tag -a $(nextversion) -m "version $(nextversion)"


.PHONY : install

22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ CZ: PHP Knihovna pro snadnou práci s API [Subreg.cz](https://subreg.cz/manual/)
[![Source Code](http://img.shields.io/badge/source/Spoje-NET/php-subreg-blue.svg?style=flat-square)](https://github.com/Spoje-NET/php-subreg)
[![Latest Version](https://img.shields.io/github/release/Spoje-NET/php-subreg.svg?style=flat-square)](https://github.com/Spoje-NET/php-subreg/releases)
[![Software License](https://img.shields.io/badge/license-GNU-brightgreen.svg?style=flat-square)](https://github.com/Spoje-NET/php-subreg/blob/master/LICENSE)
[![time tracker](https://wakatime.com/badge/github/Spoje-NET/php-subreg.svg)](https://wakatime.com/badge/github/Spoje-NET/php-subreg)
[![Build Status](https://img.shields.io/travis/Spoje-NET/php-subreg/master.svg?style=flat-square)](https://travis-ci.org/Spoje-NET/php-subreg)
[![Code Coverage](https://scrutinizer-ci.com/g/Spoje-NET/php-subreg/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/Spoje-NET/php-subreg/?branch=master)
[![Docker pulls](https://img.shields.io/docker/pulls/vitexsoftware/php-subreg.svg)](https://hub.docker.com/r/vitexsoftware/php-subreg/)
@@ -66,20 +67,21 @@ PHP rozšíření SoapClient komunikovat se soap.subreg.cz.
http://demoreg.net/en/settings/settings


Docker
------

docker pull vitexsoftware/php-subreg

Debian/Ubuntu
-------------

Pro Linux jsou k dispozici .deb balíčky. Prosím použijte repo:

wget -O - http://v.s.cz/info@vitexsoftware.cz.gpg.key|sudo apt-key add -
echo deb http://v.s.cz/ stable main > /etc/apt/sources.list.d/ease.list
aptitude update
aptitude install php-subreg
```shell
sudo apt install lsb-release wget apt-transport-https bzip2

sudo wget -O /usr/share/keyrings/vitexsoftware.gpg https://repo.vitexsoftware.cz/keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/vitexsoftware.gpg] https://repo.vitexsoftware.cz $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/vitexsoftware.list
sudo apt update

sudo apt install php-spojenet-subreg
```


V tomto případě je potřeba do souboru composer.json vaší aplikace přidat:

@@ -98,7 +100,7 @@ V tomto případě je potřeba do souboru composer.json vaší aplikace přidat:
},
{
"type": "path",
"url": "/usr/share/php/Ease",
"url": "/usr/share/php/EaseCore",
"options": {
"symlink": true
}
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "spoje.net/subreg",
"name": "spojenet/subreg",
"description": "PHP Based Library for easy interaction with soap.subreg.cz",
"license": "GPL-2.0",
"license": "MIT",
"authors": [
{
"name": "Vítězslav Dvořák",
@@ -10,7 +10,7 @@
],
"require": {
"ext-soap": "*",
"vitexsoftware/ease-framework": "dev-master"
"vitexsoftware/ease-core": ">=1.12"
},
"autoload": {
"psr-4": {
@@ -19,12 +19,12 @@
},
"autoload-dev": {
"psr-4": {
"Test\\Ease\\": "vendor/vitexsoftware/ease-framework/tests/src/Ease",
"Test\\Ease\\": "vendor/vitexsoftware/ease-core/tests/src/Ease",
"Test\\Subreg\\": "testing/src/Subreg/",
"Test\\": "testing/"
}
},
"require-dev": {
"phpunit/phpunit": "^8"
"phpunit/phpunit": ">=9"
}
}
13 changes: 0 additions & 13 deletions config.json

This file was deleted.

6 changes: 5 additions & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
php-subreg (0.4) UNRELEASED; urgency=medium
php-spojenet-subreg (1.0) UNRELEASED; urgency=medium

[ Vítězslav Dvořák ]
* +SetAutoRenew
* +RenewDomain

[ vitex ]
*

-- Vítězslav Dvořák <vitex@develoid.jinonice.czf> Thu, 12 Sep 2019 13:34:35 +0200

php-subreg (0.3) unstable; urgency=medium
8 changes: 7 additions & 1 deletion debian/composer.json
Original file line number Diff line number Diff line change
@@ -11,11 +11,17 @@
"version": "0.4",
"require": {
"ext-soap": "*",
"deb/ease-framework": "*"
"deb/ease-core": "*"
},
"autoload": {
"psr-4": {
"Subreg\\": "."
}
},
"repositories": [
{
"type": "path",
"url": "/usr/share/php/EaseCore"
}
],
}
6 changes: 3 additions & 3 deletions debian/control
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: php-subreg
Source: php-spojenet-subreg
Build-Depends: debhelper (>= 7.0.50~)
Section: web
Standards-Version: 3.9.8
@@ -7,8 +7,8 @@ Uploaders: Vitex <vitex@hippy.cz>
Priority: optional
Homepage: https://github.com/Spoje-NET/php-subreg

Package: php-subreg
Depends: ${misc:Depends}, ease-framework
Package: php-spojentet-subreg
Depends: ${misc:Depends}, php-vitexsoftware-ease-core, php-soap
Architecture: all
Section: web
Priority: optional
Loading