Skip to content

Commit

Permalink
Merge pull request #29 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 1.5.4
  • Loading branch information
andyone authored Apr 3, 2021
2 parents 56d06ab + 559fbe0 commit e007f31
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ jobs:

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

strategy:
matrix:
go: [ '1.14.x', '1.15.x' ]
go: [ '1.15.x', '1.16.x' ]

steps:
- name: Set up Go
Expand Down Expand Up @@ -61,7 +62,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Run Perfecto docker image
uses: docker://essentialkaos/perfecto:slim
uses: docker://essentialkaos/perfecto:micro
with:
args: --version

Expand All @@ -72,5 +73,5 @@ jobs:
- name: Run Perfecto check
env:
IMAGE: essentialkaos/perfecto:slim
IMAGE: essentialkaos/perfecto:micro
run: ./perfecto-docker common/deadline.spec
7 changes: 5 additions & 2 deletions common/deadline.spec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

Summary: Simple utility for controlling application working time
Name: deadline
Version: 1.5.3
Version: 1.5.4
Release: 0%{?dist}
Group: Applications/System
License: Apache 2.0
Expand All @@ -20,7 +20,7 @@ Source0: https://source.kaos.st/%{name}/%{name}-%{version}.tar.bz2

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

BuildRequires: golang >= 1.14
BuildRequires: golang >= 1.15

Provides: %{name} = %{version}-%{release}

Expand Down Expand Up @@ -57,6 +57,9 @@ rm -rf %{buildroot}
################################################################################

%changelog
* Sun Apr 04 2021 Anton Novojilov <[email protected]> - 1.5.4-0
- Updated compatibility with the latest version of ek

* Fri Dec 04 2020 Anton Novojilov <[email protected]> - 1.5.3-0
- ek package updated to v12

Expand Down
13 changes: 7 additions & 6 deletions deadline.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,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 All @@ -31,7 +31,7 @@ import (

const (
APP = "deadline"
VER = "1.5.3"
VER = "1.5.4"
DESC = "Simple utility for controlling application working time"
)

Expand Down Expand Up @@ -205,22 +205,23 @@ func getAllSubProcPIDs(info *process.ProcessInfo) []int {

// parseSignalInfo parse signal data
func parseTimeAndSignal(data string) (SignalInfo, error) {
var err error
var wait int64
var sig syscall.Signal

if !strings.Contains(data, ":") {
wait = timeutil.ParseDuration(data)
wait, err = timeutil.ParseDuration(data)

if wait == 0 {
if err != nil {
return SignalInfo{}, fmt.Errorf("Can't parse %s", data)
}

return SignalInfo{wait, syscall.SIGTERM}, nil
}

wait = timeutil.ParseDuration(strutil.ReadField(data, 0, true, ":"))
wait, err = timeutil.ParseDuration(strutil.ReadField(data, 0, true, ":"))

if wait == 0 {
if err != nil {
return SignalInfo{}, fmt.Errorf("Can't parse %s", data)
}

Expand Down

0 comments on commit e007f31

Please sign in to comment.