Handle `morss-helper` with `setup.py`
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
fb643f5ef1
commit
ef14567d87
|
@ -38,7 +38,6 @@ steps:
|
||||||
from_secret: ssh_key
|
from_secret: ssh_key
|
||||||
source:
|
source:
|
||||||
- dist/morss.tar.gz
|
- dist/morss.tar.gz
|
||||||
- morss-helper
|
|
||||||
target: /home/ubuntu
|
target: /home/ubuntu
|
||||||
|
|
||||||
- name: deploy
|
- name: deploy
|
||||||
|
@ -54,7 +53,6 @@ steps:
|
||||||
script:
|
script:
|
||||||
- sudo pip install --upgrade dist/morss.tar.gz[full]
|
- sudo pip install --upgrade dist/morss.tar.gz[full]
|
||||||
- sudo rm -r dist
|
- sudo rm -r dist
|
||||||
- sudo mv morss-helper /usr/local/bin/morss-helper
|
|
||||||
- sudo morss-helper reload
|
- sudo morss-helper reload
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
|
|
|
@ -168,7 +168,7 @@ write_files:
|
||||||
permissions: 744
|
permissions: 744
|
||||||
content: |
|
content: |
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
/usr/local/bin/morss-helper
|
/usr/local/bin/morss-helper daemon
|
||||||
|
|
||||||
runcmd:
|
runcmd:
|
||||||
- source /etc/environment
|
- source /etc/environment
|
||||||
|
@ -176,8 +176,6 @@ runcmd:
|
||||||
- iptables -I INPUT 6 -m state --state NEW -p tcp --dport ${PORT:-8000} -j ACCEPT
|
- iptables -I INPUT 6 -m state --state NEW -p tcp --dport ${PORT:-8000} -j ACCEPT
|
||||||
- netfilter-persistent save
|
- netfilter-persistent save
|
||||||
- pip install morss[full]
|
- pip install morss[full]
|
||||||
- python -m morss.crawler https://git.pictuga.com/pictuga/morss/raw/branch/master/morss-helper > /usr/local/bin/morss-helper
|
|
||||||
- chmod +x /usr/local/bin/morss-helper
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Run
|
## Run
|
||||||
|
|
6
setup.py
6
setup.py
|
@ -32,5 +32,7 @@ setup(
|
||||||
('share/' + package_name + '/www', glob('www/*.*')),
|
('share/' + package_name + '/www', glob('www/*.*')),
|
||||||
],
|
],
|
||||||
entry_points = {
|
entry_points = {
|
||||||
'console_scripts': [package_name + '=' + package_name + '.__main__:main']
|
'console_scripts': [package_name + '=' + package_name + '.__main__:main'],
|
||||||
})
|
},
|
||||||
|
scripts = ['morss-helper'],
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in New Issue