Migrated release script to use Buck exclusively.

Change-Id: I04371594b68071488788c4ecbdb896a6306a2a14
diff --git a/bucklets/onos.bucklet b/bucklets/onos.bucklet
index 7f46235..8636a2a 100644
--- a/bucklets/onos.bucklet
+++ b/bucklets/onos.bucklet
@@ -262,3 +262,25 @@
       srcs = test_srcs,
       jar_target = ':' + name + '-tests',
   )
+
+def tar_file(
+   name,
+   srcs,
+   root = None,
+   out = None,
+   visibility = [ 'PUBLIC' ],
+   ):
+
+   cmd = ( 'mkdir -p $TMP/%(root_dir)s && '
+           'cp -r $SRCDIR/ $TMP/%(root_dir)s && '
+           'tar -C $TMP -zcf $OUT %(root_dir)s' ) % {
+           'root_dir': root if root is not None else name
+         }
+
+   genrule(
+       name = name,
+       srcs = srcs,
+       bash = cmd,
+       out = out if out is not None else ( root if root is not None else name ) + '.tar.gz',
+       visibility = visibility,
+   )