Ori.livneh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/72915


Change subject: Notify user if fresh upstream commits are available
......................................................................

Notify user if fresh upstream commits are available

This patch adds a script to profile.d/ which notifies the user at the start of
an interactive shell if there are upstream MediaWiki-Vagrant commits that have
not been merged to the local master branch. The patch complements I4a6529f30,
which ensures that remote commits are fetched periodically.

Change-Id: I2bc14934ff4c607eec0c9a31ae24820d7742c08f
---
A puppet/modules/misc/files/check-mediawiki-vagrant.sh
M puppet/modules/misc/manifests/init.pp
2 files changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/15/72915/1

diff --git a/puppet/modules/misc/files/check-mediawiki-vagrant.sh 
b/puppet/modules/misc/files/check-mediawiki-vagrant.sh
new file mode 100755
index 0000000..68183ae
--- /dev/null
+++ b/puppet/modules/misc/files/check-mediawiki-vagrant.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+# If there are unmerged upstream changes for MediaWiki-Vagrant, this script
+# will tell you so and explain how to merge them.
+#
+# This file is managed by Puppet.
+#
+[ -z "$BASH_VERSION" -o -z "$PS1" ] && return
+
+COMMITS=$(git --git-dir=/vagrant/.git rev-list HEAD...origin/master 
--right-only --count 2>/dev/null)
+if [ -n "$COMMITS" ] && [ "$COMMITS" -gt 0 ]; then
+    printf "Updates for MediaWiki-Vagrant are available. "
+    printf "Run '$(tput bold; tput setaf 3)git pull$(tput sgr0)' in your 
Vagrant directory to get them.\n"
+fi
diff --git a/puppet/modules/misc/manifests/init.pp 
b/puppet/modules/misc/manifests/init.pp
index 14194a4..068d675 100644
--- a/puppet/modules/misc/manifests/init.pp
+++ b/puppet/modules/misc/manifests/init.pp
@@ -34,6 +34,9 @@
         '/etc/profile.d/color.sh':
             mode   => '0755',
             source => 'puppet:///modules/misc/color.sh';
+        '/etc/profile.d/check-mediawiki-vagrant.sh':
+            mode   => '0755',
+            source => 'puppet:///modules/misc/check-mediawiki-vagrant.sh',
     }
 
     file { [

-- 
To view, visit https://gerrit.wikimedia.org/r/72915
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2bc14934ff4c607eec0c9a31ae24820d7742c08f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <o...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to