Compare commits
12 Commits
0cf55aef93
...
1665461618
Author | SHA1 | Date | |
---|---|---|---|
c9de444432 | |||
a83e4016ab | |||
d069196887 | |||
ffefad5db5 | |||
f0121274a6 | |||
302dcd5529 | |||
0a55b3ae8c | |||
494afed4ae | |||
b12902183d | |||
f3822c32f2 | |||
8c5004c24d | |||
fb7544fe98 |
@ -1,4 +1,4 @@
|
|||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
from multiprocessing import Process, Manager, Pool, TimeoutError, freeze_support, active_children
|
from multiprocessing import Process, Manager, Pool, TimeoutError, freeze_support, active_children
|
||||||
@ -47,8 +47,8 @@ def netstat_done(res):
|
|||||||
|
|
||||||
def process_done(res):
|
def process_done(res):
|
||||||
fprint("uploading to sftp...")
|
fprint("uploading to sftp...")
|
||||||
ssh.sftp_send_data(res, config, datafile)
|
#ssh.sftp_send_data(res, config, datafile)
|
||||||
#procdata_res = pool.apply_async(ssh.sftp_send_data, (res, config, datafile))
|
procdata_res = pool.apply_async(ssh.sftp_send_data, (res, config, datafile))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
34
release.sh
34
release.sh
@ -1,21 +1,25 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -xeuo pipefail
|
#set -x
|
||||||
|
|
||||||
TOKEN=$(< token.txt)
|
TOKEN=$(< token.txt)
|
||||||
git commit -a
|
EDITOR=nano git commit -a
|
||||||
|
git push
|
||||||
|
|
||||||
COMMIT=$(git log | head -n 1 | cut -d' ' -f2)
|
COMMIT=$(git log | head -n 1 | cut -d' ' -f2)
|
||||||
echo $COMMIT
|
echo $COMMIT
|
||||||
export PATH=$PATH:"C:\Program Files\7-Zip"
|
export PATH=$PATH:"C:\Program Files\7-Zip"
|
||||||
|
TAG=$(date +%s)
|
||||||
|
"C:/Program Files/Python310/python.exe" setup.py build
|
||||||
|
sleep 2
|
||||||
7z a -r release-$COMMIT.zip ./build/exe.win-amd64-3.10/*
|
7z a -r release-$COMMIT.zip ./build/exe.win-amd64-3.10/*
|
||||||
|
7z a -sfx7z.sfx IPPigeon-install.exe ./build/exe.win-amd64-3.10/*
|
||||||
|
#sleep 30
|
||||||
DATA='{
|
DATA='{
|
||||||
"body": "Autogenerated release",
|
"body": "Autogenerated release",
|
||||||
"draft": true,
|
"draft": false,
|
||||||
"name": "Development release",
|
"name": "Development release",
|
||||||
"prerelease": true,
|
"prerelease": true,
|
||||||
"tag_name": "testing",
|
"tag_name": "'$TAG'",
|
||||||
"target_commitish": "'$COMMIT'"
|
"target_commitish": "'$COMMIT'"
|
||||||
}'
|
}'
|
||||||
OUT=$(curl -X 'POST' \
|
OUT=$(curl -X 'POST' \
|
||||||
@ -26,9 +30,23 @@ OUT=$(curl -X 'POST' \
|
|||||||
|
|
||||||
ID=$(echo $OUT | cut -d',' -f 1 | cut -d':' -f 2)
|
ID=$(echo $OUT | cut -d',' -f 1 | cut -d':' -f 2)
|
||||||
|
|
||||||
OUT=curl -X 'POST' \
|
OUT=$(curl -X 'POST' \
|
||||||
'https://git.deck.sh/api/v1/repos/Interfaz/ff/releases/'$ID'/assets?token='$TOKEN'' \
|
'https://git.deck.sh/api/v1/repos/Interfaz/ff/releases/'$ID'/assets?token='$TOKEN'' \
|
||||||
-H 'accept: application/json' \
|
-H 'accept: application/json' \
|
||||||
-H 'Content-Type: multipart/form-data' \
|
-H 'Content-Type: multipart/form-data' \
|
||||||
-F 'attachment=@'release-$COMMIT.zip';type=application/x-zip-compressed'
|
-F 'attachment=@IPPigeon-install.exe;type=application/octet-stream')
|
||||||
|
|
||||||
|
URL=$(echo $OUT | cut -d',' -f 7 | cut -d\" -f4)
|
||||||
|
|
||||||
|
curl -d "$URL" https://notify.deck.sh/ipro-release
|
||||||
|
echo $URL
|
||||||
|
|
||||||
|
OUT=$(curl -X 'POST' \
|
||||||
|
'https://git.deck.sh/api/v1/repos/Interfaz/ff/releases/'$ID'/assets?token='$TOKEN'' \
|
||||||
|
-H 'accept: application/json' \
|
||||||
|
-H 'Content-Type: multipart/form-data' \
|
||||||
|
-F 'attachment=@'release-$COMMIT.zip';type=application/x-zip-compressed')
|
||||||
|
|
||||||
|
|
||||||
|
rm release-$COMMIT.zip
|
||||||
|
rm IPPigeon-install.exe
|
2
setup.py
2
setup.py
@ -2,7 +2,7 @@ import sys
|
|||||||
from cx_Freeze import setup, Executable
|
from cx_Freeze import setup, Executable
|
||||||
|
|
||||||
debug = True
|
debug = True
|
||||||
debug = not debug
|
#debug = not debug
|
||||||
# Dependencies are automatically detected, but it might need fine tuning.
|
# Dependencies are automatically detected, but it might need fine tuning.
|
||||||
# "packages": ["os"] is used as example only
|
# "packages": ["os"] is used as example only
|
||||||
build_exe_options = {"packages": ["os"], "excludes": ["tkinter"], "include_msvcr": True, "include_files": ["icon.png", "IPPigeon.lnk", "config.yml", "keyfile-admin.pem"], "optimize": 2}
|
build_exe_options = {"packages": ["os"], "excludes": ["tkinter"], "include_msvcr": True, "include_files": ["icon.png", "IPPigeon.lnk", "config.yml", "keyfile-admin.pem"], "optimize": 2}
|
||||||
|
Reference in New Issue
Block a user