add commands to makefile

pull/24/head
Etienne Trimaille 2015-12-23 11:06:08 +01:00
rodzic f164bea4af
commit 3226af176b
3 zmienionych plików z 17 dodań i 2 usunięć

1
.gitignore vendored
Wyświetl plik

@ -8,3 +8,4 @@ settings/*.state.txt
settings/*.poly
settings/last.state.txt
settings/custom_url_diff.txt
settings/timestamp.txt

Wyświetl plik

@ -34,4 +34,18 @@ rm: kill
@echo "------------------------------------------------------------------"
@echo "Removing production instance!!! "
@echo "------------------------------------------------------------------"
@docker-compose -p $(PROJECT_ID) rm
@docker-compose -p $(PROJECT_ID) rm
ipdb:
@echo
@echo "------------------------------------------------------------------"
@echo "Database's IP"
@echo "------------------------------------------------------------------"
@docker inspect $(PROJECT_ID)_db_1 | grep '"IPAddress"' | head -1 | cut -d '"' -f 4
timestamp:
@echo
@echo "------------------------------------------------------------------"
@echo "Timestamp"
@echo "------------------------------------------------------------------"
@docker exec -t -i $(PROJECT_ID)_imposm_1 cat /home/settings/timestamp.txt

Wyświetl plik

@ -219,7 +219,7 @@ while True:
database_timestamp = diff.split('.')[0].split('->-')[1]
file_path = join(default['SETTINGS'], 'timestamp.txt')
timestamp_file = open(file_path, 'w')
timestamp_file.write(database_timestamp)
timestamp_file.write('%s\n' % database_timestamp)
timestamp_file.close()
print 'Import diff successful : %s' % diff