diff --git a/Makefile b/Makefile index 3defea951..580a0a450 100644 --- a/Makefile +++ b/Makefile @@ -46,3 +46,7 @@ lessc: # `sudo dpkg -i drone.deb` deb: dpkg-deb --build debian/drone + +deploy: + scp -i $$DRONE_STAGING_KEY debian/drone.deb $$DRONE_STAGING_USER@$$DRONE_STAGING_HOST:/tmp + ssh -i $$DRONE_STAGING_KEY $$DRONE_STAGING_USER@$$DRONE_STAGING_HOST -- dpkg -i /tmp/drone.deb \ No newline at end of file diff --git a/debian/drone/etc/init/drone.conf b/debian/drone/etc/init/drone.conf index 8940bfea5..fda2a5862 100644 --- a/debian/drone/etc/init/drone.conf +++ b/debian/drone/etc/init/drone.conf @@ -1,9 +1,11 @@ start on (filesystem and net-device-up) -chdir /root/.drone console log script + mkdir -p /root/.drone + cd /root/.drone + DRONED_OPTS="--port=:80" if [ -f /etc/default/$UPSTART_JOB ]; then . /etc/default/$UPSTART_JOB diff --git a/server/app/scripts/app.js b/server/app/scripts/app.js index fe4502c5e..8167238e6 100644 --- a/server/app/scripts/app.js +++ b/server/app/scripts/app.js @@ -139,10 +139,14 @@ app.config(['$routeProvider', '$locationProvider', function($routeProvider, $loc $locationProvider.html5Mode(true); }]); -/* Directives */ - /* also see https://coderwall.com/p/vcfo4q */ -app.run(['$location', '$rootScope', '$routeParams', function($location, $rootScope, $routeParams) { +app.run(['$location', '$rootScope', '$routeParams', 'feed', 'stdout', function($location, $rootScope, $routeParams, feed, stdout) { + + $rootScope.$on('$routeChangeStart', function (event, next) { + feed.unsubscribe(); + stdout.unsubscribe(); + }); + $rootScope.$on('$routeChangeSuccess', function (event, current, previous) { document.title = current.$$route.title + ' ยท drone.io'; }); diff --git a/server/app/scripts/services/feed.js b/server/app/scripts/services/feed.js index cee9da0a4..a12090cf2 100644 --- a/server/app/scripts/services/feed.js +++ b/server/app/scripts/services/feed.js @@ -19,6 +19,6 @@ angular.module('app').service('feed', ['$http', '$window', function($http, $wind }; this.unsubscribe = function() { - ws.close(); + wsCallback = undefined; }; }]); diff --git a/server/app/views/branch.html b/server/app/views/branch.html deleted file mode 100644 index c98ed984d..000000000 --- a/server/app/views/branch.html +++ /dev/null @@ -1,48 +0,0 @@ -
Status | -Branch | -Sha | -PR | -Author | -Message | -Started | -Finished | -|
---|---|---|---|---|---|---|---|---|
- - {{ commit.status }} - - | -- - {{ commit.branch }} - - | -- - {{ commit.sha | shortHash }} - - | -{{ commit.pull_request }} | -{{ commit.author }} | -- | {{ commit.message }} | -{{ commit.started_at | fromNow }} | -{{ commit.finished_at | fromNow }} | -