Browse Source

modified: .github/workflows/mikrotik_patch_7.yml

modified:   npk.py
pull/123/head
zyb 9 months ago
parent
commit
1935f35864
  1. 4
      .github/workflows/mikrotik_patch_7.yml
  2. 2
      npk.py

4
.github/workflows/mikrotik_patch_7.yml

@ -74,7 +74,7 @@ jobs:
BUILD_TIME="${{ github.event.inputs.buildtime }}" BUILD_TIME="${{ github.event.inputs.buildtime }}"
RELEASE="${{ github.event.inputs.release }}" RELEASE="${{ github.event.inputs.release }}"
if [ -z "$BUILD_TIME" ]; then if [ -z "$BUILD_TIME" ]; then
BUILD_TIME=$(date +'%Y%m%d%H%M%S')
BUILD_TIME=$(date +'%s')
fi fi
if [ -z "$RELEASE" ]; then if [ -z "$RELEASE" ]; then
RELEASE=false RELEASE=false
@ -83,7 +83,7 @@ jobs:
CHANNEL="${{ github.event.inputs.channel }}" CHANNEL="${{ github.event.inputs.channel }}"
MATRIX_JSON=$(jq -nc --arg arch "$ARCH" --arg channel "$CHANNEL" '[{arch: $arch, channel: $channel}]') MATRIX_JSON=$(jq -nc --arg arch "$ARCH" --arg channel "$CHANNEL" '[{arch: $arch, channel: $channel}]')
else else
BUILD_TIME=$(date +'%Y%m%d%H%M%S')
BUILD_TIME=$(date +'%s')
RELEASE=true RELEASE=true
MATRIX_JSON='[ MATRIX_JSON='[
{"arch":"x86","channel":"stable"}, {"arch":"x86","channel":"stable"},

2
npk.py

@ -228,7 +228,7 @@ class NovaPackage(Package):
def sign(self,kcdsa_private_key:bytes,eddsa_private_key:bytes): def sign(self,kcdsa_private_key:bytes,eddsa_private_key:bytes):
import hashlib import hashlib
from mikro import mikro_kcdsa_sign,mikro_eddsa_sign from mikro import mikro_kcdsa_sign,mikro_eddsa_sign
build_time = os.environ['BUILD_TIME'] if 'BUILD_TIME' in os.environ else None
build_time = os.getenv('BUILD_TIME',None)
if len(self._packages) > 0: if len(self._packages) > 0:
if build_time: if build_time:
self[NpkPartID.PKG_INFO].data._build_time = int(build_time) self[NpkPartID.PKG_INFO].data._build_time = int(build_time)

Loading…
Cancel
Save