1#!/bin/sh
2
3
4#
5# TODO - could we grab the version number from include/libmesh_config.h?
6#
7
8#
9# Define the usage() function
10#
11usage ()
12{
13  echo "usage: $0 release-id-string"
14  echo " e.g.: $0 libmesh-0.4.3"
15  exit
16}
17
18
19#
20# Need at least one command-line argument
21#
22if [ "$#" != "1" ] ; then
23    usage $0
24fi
25
26# Need to run this from a configured directory
27if [ ! -f Makefile -o ! -f config.log ] ; then
28    echo "error: no Makefile/config.log, please run from a configured directory tree!"
29    exit
30fi
31
32#
33# Get the user-specified release string
34#
35release=$1
36tagname=$release #`echo $release | sed -e "s/[.]/_/g"`
37#echo "tagname = $tagname"
38
39#
40# create tarballs via 'make dist'
41#
42echo ""
43echo "Creating distribution files..."
44make dist >/dev/null || exit
45ls -l libmesh*.tar.*
46
47#
48# tag the current libmesh/master git repository for this release
49#
50echo ""
51echo "Tagging master git repository as \"$tagname\""
52git tag -a $tagname -m "tagging libMesh $tagname"
53#git push origin $tagname
54
55#
56# Possibly upload the file to sourceforge
57#
58echo ""
59echo "Done."
60echo "Would you like to open an SFTP connection to frs.sourceforge.net"
61echo "so you can put the file in the /incoming directory?"
62echo -n "Y or N? "
63read ans
64if [ "$ans" = "Y" -o "$ans" = "y" -o "$ans" = "Yes" -o "$ans" = "yes" ]; then
65    echo "**************************************"
66    echo " once you are in, type:"
67    echo " cd /home/frs/project/libmesh/libmesh "
68    echo " and go about your business, e.g."
69    echo " $ mkdir foo"
70    echo " $ cd foo"
71    echo " $ put libmesh*.tar.*"
72    echo "**************************************"
73    exec sftp frs.sourceforge.net
74fi
75
76
77
78# Local Variables:
79# mode: shell-script
80# End:
81