Browse Source

Updated Deployment script by adding colors to it

Yoginth 7 năm trước cách đây
mục cha
commit
bb49ee900a
6 tập tin đã thay đổi với 4 bổ sung85 xóa
  1. 0 10
      script/bootstrap
  2. 0 23
      script/cibuild
  3. 4 1
      script/deploy
  4. 0 16
      script/server
  5. 0 12
      script/setup
  6. 0 23
      script/update

+ 0 - 10
script/bootstrap

@@ -1,10 +0,0 @@
-#!/bin/sh
-
-# script/bootstrap: Resolve all dependencies that the application requires to
-#                   run.
-
-cat script/misc/oteascii.txt
-
-set -e
-
-script/server

+ 0 - 23
script/cibuild

@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# script/cibuild: Setup environment for CI to run tests. This is primarily
-#                 designed to run on the continuous integration server.
-
-set -e
-
-cat script/misc/oteascii.txt
-
-echo "Tests started at…"
-date "+%H:%M:%S"
-
-git pull origin develop
-make bindata
-make less
-go build
-
-# run tests
-echo "Running tests…"
-date "+%H:%M:%S"
-
-# run tests.
-script/test

+ 4 - 1
script/deploy

@@ -10,16 +10,19 @@ tput setaf 1; echo "Deploy started at…"
 date "+%H:%M:%S"
 
 tput setaf 3; echo "Pulling From Source…"
+tput sgr0;
 git pull
 
 tput setaf 3; echo "Building binary…"
+tput sgr0;
 go build
 
 tput setaf 3; echo "Restarting Gitote Service…"
+tput sgr0;
 sudo systemctl restart gitote
 
 tput setaf 1; echo "Deploy ended at…"
 date "+%H:%M:%S"
 
-tput setaf 2; echo "==> App is successfully deployed"
+tput setaf 2; echo "==> App is successfully deployed to Digitalcean server"
 tput setaf 2; echo "==> https://gitote.in"

+ 0 - 16
script/server

@@ -1,16 +0,0 @@
-#!/bin/sh
-
-# script/server: Launch the application and any extra required processes
-#                locally.
-
-cat script/misc/oteascii.txt
-
-set -e
-
-cd $GOPATH/src/gitote/gitote
-
-script/update
-
-echo "==> Updating db…"
-# run all database migrations to ensure everything is up to date.
-go build

+ 0 - 12
script/setup

@@ -1,12 +0,0 @@
-#!/bin/sh
-
-# script/setup: Set up application for the first time after cloning, or set it
-#               back to the initial first unused state.
-
-cat script/misc/oteascii.txt
-
-set -e
-
-script/server
-
-echo "==> App is now ready to go!"

+ 0 - 23
script/update

@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# script/update: Update application to run for its current checkout.
-
-cat script/misc/oteascii.txt
-
-set -e
-
-cd $GOPATH/src/gitote/gitote
-
-echo "==> Pulling Latest version of Gitote"
-git pull origin master
-
-echo "==> Starting PostgreSQL Database"
-sudo systemctl restart postgresql
-
-echo "==> Building…"
-make bindata
-make less
-go build
-
-echo "==> Restarting Gitote Service…"
-sudo systemctl restart gitote