Compare commits

...

16 Commits

Author SHA1 Message Date
09836efcc4 Ignore all generated csvs for development 2022-10-10 23:51:54 -05:00
1254b543e9 Add both links to ntfy 2022-10-10 23:38:42 -05:00
3838c37b1b Add icon to built exe, default run as admin with manifest, add bash runner script 2022-10-10 23:25:26 -05:00
02175cc67e Install into subfolder 2022-10-10 23:15:54 -05:00
c9de444432 Add exe installer builder 2022-10-10 23:13:30 -05:00
a83e4016ab Fix program quit, enable debug mode 2022-10-10 22:35:52 -05:00
d069196887 actually figure out tags now 2022-10-10 22:25:10 -05:00
ffefad5db5 Actually build before release 2022-10-10 22:13:31 -05:00
f0121274a6 Add notifications 2022-10-10 22:10:58 -05:00
302dcd5529 figure out how tags work 2022-10-10 22:08:54 -05:00
0a55b3ae8c Fix branch tag for release 2022-10-10 22:05:45 -05:00
494afed4ae Actually push commits 2022-10-10 22:03:07 -05:00
b12902183d Unique release tag 2022-10-10 22:01:36 -05:00
f3822c32f2 Publish release 2022-10-10 21:56:38 -05:00
8c5004c24d reformat curl 2022-10-10 21:51:34 -05:00
fb7544fe98 fix release script 2022-10-10 21:50:47 -05:00
6 changed files with 41 additions and 17 deletions

3
.gitignore vendored
View File

@ -1,8 +1,7 @@
__pycache__/ __pycache__/
build/ build/
config.yaml config.yaml
0xf44ee3942e7dgendata.csv *.csv
0xf44ee3942e7agendata.csv
admin-key.ppk admin-key.ppk
token.txt token.txt
*.zip *.zip

BIN
icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 KiB

View File

@ -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))

View File

@ -1,21 +1,27 @@
#!/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)
7z a -r release-$COMMIT.zip ./build/exe.win-amd64-3.10/* "C:/Program Files/Python310/python.exe" setup.py build
sleep 2
mv ./build/exe.win-amd64-3.10/ ./build/ippigeon-win
7z a -r release-$COMMIT.zip ./build/ippigeon-win
7z a -sfx7z.sfx IPPigeon-install.exe ./build/ippigeon-win
mv ./build/ippigeon-win/ ./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 +32,26 @@ 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)
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')
URLZIP=$(echo $OUT | cut -d',' -f 7 | cut -d\" -f4)
curl -d "Self extracting installer: $URL
Portable Zip: $URLZIP" https://notify.deck.sh/ipro-release
rm release-$COMMIT.zip
rm IPPigeon-install.exe

2
run.sh Normal file
View File

@ -0,0 +1,2 @@
"C:/Program Files/Python310/python.exe" setup.py build

View File

@ -2,10 +2,10 @@ 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", "config.yml", "keyfile-admin.pem"], "optimize": 2}
# base="Win32GUI" should be used only for Windows GUI app # base="Win32GUI" should be used only for Windows GUI app
base = None base = None
@ -17,5 +17,5 @@ setup(
version="0.2.4", version="0.2.4",
description="IP Pigeon client application", description="IP Pigeon client application",
options={"build_exe": build_exe_options}, options={"build_exe": build_exe_options},
executables=[Executable("ippigeon.py", base=base)], executables=[Executable("ippigeon.py", base=base, icon="icon.ico", uac_admin=True, target_name="IPPigeon.exe")],
) )