added deploy script and rename playlist
This commit is contained in:
parent
4c9efbd614
commit
e1935d4b23
@ -13,6 +13,7 @@
|
||||
.git
|
||||
.gitignore
|
||||
.vscode
|
||||
service.json
|
||||
|
||||
venv
|
||||
node_modules
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
scratch.py
|
||||
service.json
|
||||
|
||||
node_modules/
|
||||
|
||||
|
35
deploy
Executable file
35
deploy
Executable file
@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
stage_dir=_playlist-manager
|
||||
|
||||
echo '>> backing up a directory'
|
||||
cd ..
|
||||
|
||||
echo '>> deleting old deployment stage'
|
||||
rm -rf $stage_dir
|
||||
|
||||
echo '>> copying main source'
|
||||
cp -r playlist-manager $stage_dir
|
||||
|
||||
echo '>> injecting spotframework'
|
||||
cp -r spotframework/spotframework $stage_dir/
|
||||
|
||||
echo '>> injecting fmframework'
|
||||
cp -r fmframework/fmframework $stage_dir/
|
||||
|
||||
echo '>> injecting spotfm'
|
||||
cp -r spotfm/spotfm $stage_dir/
|
||||
|
||||
cd $stage_dir
|
||||
|
||||
echo '>> building css'
|
||||
sass --style=compressed src/scss/style.scss build/style.css
|
||||
|
||||
echo '>> building javascript'
|
||||
npm run build
|
||||
|
||||
echo '>> deploying'
|
||||
gcloud config set project sarsooxyz
|
||||
gcloud app deploy
|
||||
|
||||
|
13
rename_playlist.py
Normal file
13
rename_playlist.py
Normal file
@ -0,0 +1,13 @@
|
||||
import music.db.database as database
|
||||
|
||||
playlists = database.get_user_playlists('andy')
|
||||
|
||||
name = input('enter playlist name: ')
|
||||
|
||||
playlist = next((i for i in playlists if i.name == name), None)
|
||||
|
||||
if playlist is not None:
|
||||
new_name = input('enter new name: ')
|
||||
playlist.update_database({'name': new_name})
|
||||
else:
|
||||
print('playlist not found')
|
@ -3,13 +3,13 @@ certifi==2019.11.28
|
||||
chardet==3.0.4
|
||||
Click==7.0
|
||||
Flask==1.1.1
|
||||
google-api-core==1.15.0
|
||||
google-auth==1.10.0
|
||||
google-cloud-core==1.1.0
|
||||
google-api-core==1.16.0
|
||||
google-auth==1.11.0
|
||||
google-cloud-core==1.2.0
|
||||
google-cloud-firestore==1.6.1
|
||||
google-cloud-logging==1.14.0
|
||||
google-cloud-tasks==1.3.0
|
||||
googleapis-common-protos==1.6.0
|
||||
googleapis-common-protos==1.51.0
|
||||
grpc-google-iam-v1==0.12.3
|
||||
grpcio==1.26.0
|
||||
idna==2.8
|
||||
@ -24,7 +24,7 @@ pyasn1-modules==0.2.8
|
||||
pytz==2019.3
|
||||
requests==2.22.0
|
||||
rsa==4.0
|
||||
six==1.13.0
|
||||
six==1.14.0
|
||||
tabulate==0.8.6
|
||||
urllib3==1.25.7
|
||||
urllib3==1.25.8
|
||||
Werkzeug==0.16.0
|
||||
|
Loading…
Reference in New Issue
Block a user