diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 958e9a7..bb75676 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -72,5 +73,5 @@ jobs: - name: Run Perfecto check env: - IMAGE: essentialkaos/perfecto:slim + IMAGE: essentialkaos/perfecto:micro run: ./perfecto-docker common/deadline.spec diff --git a/common/deadline.spec b/common/deadline.spec index 25ce69e..2c7ed89 100644 --- a/common/deadline.spec +++ b/common/deadline.spec @@ -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 @@ -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} @@ -57,6 +57,9 @@ rm -rf %{buildroot} ################################################################################ %changelog +* Sun Apr 04 2021 Anton Novojilov - 1.5.4-0 +- Updated compatibility with the latest version of ek + * Fri Dec 04 2020 Anton Novojilov - 1.5.3-0 - ek package updated to v12 diff --git a/deadline.go b/deadline.go index 3336623..09e56b6 100644 --- a/deadline.go +++ b/deadline.go @@ -4,7 +4,7 @@ package main // ////////////////////////////////////////////////////////////////////////////////// // // // -// Copyright (c) 2020 ESSENTIAL KAOS // +// Copyright (c) 2021 ESSENTIAL KAOS // // Apache License, Version 2.0 // // // // ////////////////////////////////////////////////////////////////////////////////// // @@ -31,7 +31,7 @@ import ( const ( APP = "deadline" - VER = "1.5.3" + VER = "1.5.4" DESC = "Simple utility for controlling application working time" ) @@ -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) }