Skip to content

Commit

Permalink
Release
Browse files Browse the repository at this point in the history
  • Loading branch information
DingGGu committed Sep 18, 2023
1 parent b5c3c9d commit b7df86a
Show file tree
Hide file tree
Showing 11 changed files with 151 additions and 344 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Package Aurora Echo

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Packaging
run: |
pip install pipenv
make release
- uses: actions/upload-artifact@v2
with:
name: aurora-echo
path: dist/*
24 changes: 7 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
PYTHON_MAIN=aurora_echo/__init__.py
FINAL_EXECUTABLE=aurora-echo
BUILD_DIR=build
PYTHON_INTERPRETER=python3
.PHONY: build

.PHONY: all clean build lint

all: clean build
all: build

clean:
@rm -rf *.pyc
@echo "Project .pyc's removed."
@rm -rf $(BUILD_DIR)
@echo "Build directory removed."

build:
#rm -f $(BUILD_DIR)/$(FINAL_EXECUTABLE)
pipenv install --deploy
python eggsecute.py $(PYTHON_MAIN) $(BUILD_DIR)/$(FINAL_EXECUTABLE)
chmod a+x $(BUILD_DIR)/$(FINAL_EXECUTABLE)
echo "Package created."
pipenv run pyinstaller --onefile aurora_echo.py

lint:
python setup.py flake8
release:
pipenv install --deploy
pipenv run pyinstaller aurora_echo.spec
shasum -a 256 dist/aurora_echo | cut -d ' ' -f 1 > dist/aurora_echo-shasum-256.txt
3 changes: 2 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ certifi = "*"
click = "==6.6"

[dev-packages]
pyinstaller = "*"

[requires]
python_version = "3.9"
python_version = "3.10"
60 changes: 57 additions & 3 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions aurora_echo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from aurora_echo import echo_clone, echo_new, echo_modify, echo_promote, echo_retire # noqa: F401
from aurora_echo.entry import root


# Entry for setuptools
def main():
"""
Bringing you yesterday's database today!
"""
root()


if __name__ == '__main__':
main()
44 changes: 44 additions & 0 deletions aurora_echo.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# -*- mode: python ; coding: utf-8 -*-


block_cipher = None


a = Analysis(
['aurora_echo.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)

exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='aurora_echo',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
39 changes: 0 additions & 39 deletions aurora_echo/__init__.py
Original file line number Diff line number Diff line change
@@ -1,39 +0,0 @@
##
# The MIT License (MIT)
#
# Copyright (c) 2016 BlackLocus
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
##
import aurora_echo.boto_monkey # noqa: F401
from aurora_echo import echo_clone, echo_new, echo_modify, echo_promote, echo_retire # noqa: F401
from aurora_echo.entry import root


# Entry for setuptools
def main():
"""
Bringing you yesterday's database today!
"""
root()


# Entry for whatever else (IntelliJ)
if __name__ == '__main__':
main()
Loading

0 comments on commit b7df86a

Please sign in to comment.