The files in this directory are for primary use by me, the maintainer
of Locale::Codes to prepare a new release.

There is no reason for an end user to need to do this. However, it
is documented for the sake of completeness, and to remind me of the
steps I need to do.

It's also available in case someone ever chooses to fork the
module (though I hope that won't be necessary).

#########################################################################
Get the newest codes. Be sure to read the entire diff to make sure that
no HTML is getting added to a code.

   cp lib/Locale/Codes/Country_Codes.pm{,.bak}
   cp lib/Locale/Codes/Language_Codes.pm{,.bak}
   cp lib/Locale/Codes/Currency_Codes.pm{,.bak}
   cp lib/Locale/Codes/Script_Codes.pm{,.bak}
   cp lib/Locale/Codes/LangExt_Codes.pm{,.bak}
   cp lib/Locale/Codes/LangVar_Codes.pm{,.bak}

   ./internal/get_codes -c
   diff lib/Locale/Codes/Country_Codes.pm{.bak,}

   ./internal/get_codes -l
   diff lib/Locale/Codes/Language_Codes.pm{.bak,}

   ./internal/get_codes -r
   diff lib/Locale/Codes/Currency_Codes.pm{.bak,}

   ./internal/get_codes -s
   diff lib/Locale/Codes/Script_Codes.pm{.bak,}

   ./internal/get_codes -L
   diff lib/Locale/Codes/LangExt_Codes.pm{.bak,}

   ./internal/get_codes -V
   diff lib/Locale/Codes/LangVar_Codes.pm{.bak,}


   ./internal/get_codes -C
   rm lib/Locale/Codes/*.bak

#########################################################################
Set the release version

   v=`cat internal/VERSION`
   for i in \
       Makefile.PL \
       Build.PL \
       internal/get_codes \
       `find lib -name \*.pm` \
   ;do
      sed -e "s,VERSION *=.*;,VERSION='$v';," $i > z
      mv z $i
   done
   chmod +x internal/get_codes

#########################################################################
Before every release, spellcheck the documents:

   for i in `find lib -type f -name \*.pod` ;do
      podspell $i > $i.txt
      ispell -p internal/ispell.isp $i.txt
      rm -f $i.txt $i.txt.bak
   done

#########################################################################
Update the Change file with the date

#########################################################################
Update the copyright

   y=`date '+%Y'`
   for i in `find . -type f | xargs egrep -l 'Copyright \(c\) ....\-.... Sullivan Beck'` ;do
     sed -e "s,\(Copyright (c) ....\)\-.... \(Sullivan Beck\),\1-$y \2," $i > z
     mv z $i
   done

#########################################################################
Regenerate the MANIFEST, Build.PL, Makefile.PL
Run the kwalitee tests

#########################################################################
To create a patch for perl:

   cd /tmp
   git clone git://perl5.git.perl.org/perl.git perl-git
   cd perl-git

   git branch sbeck
   git checkout sbeck

Update Porting/Maintainers.pl

Copy in the modified files.

   cd cpan/Locale-Codes
   dir=`find ~/perl-modules -type d -name Locale-Codes\*`

   for i in `find . -type f` ;do
      if [ ! -e $dir/$i ]; then
         echo "Remove: $i"
         git rm $i
      else
         cp -p ~/perl-modules/Locale-Codes-*/$i $i
      fi
   done

   for i in `cd $dir; find . -type f` ;do
      tmp=`echo $i | sed -e 's,\(examples\|internal\)/,,'`
      if [ "$tmp" != "$i" -o \
           "$tmp"  = "./README" -o \
           "$tmp"  = "./INSTALL" -o \
           "$tmp"  = "./Build.PL" -o \
           "$tmp"  = "./Makefile.PL" -o \
           "$tmp"  = "./MANIFEST" -o \
           "$tmp"  = "./META.yml" -o \
           "$tmp"  = "./t/runtests.bat" -o \
           "$tmp"  = "./t/runtests" -o \
           "$tmp"  = "./t/pod.t" -o \
           "$tmp"  = "./t/pod_coverage.t" \
         ]; then
         continue
      fi

      if [ ! -e $i ]; then
         echo "Added: $i"
         cp -p ~/perl-modules/Locale-Codes-*/$i $i
         git add $i
      fi
   done

   chmod -x t/*
   cd ../..

Modify the MANIFEST file if any files are added/removed.

Create the patch (NOTE: fix the version numbers):

   git config --global user.name "Sullivan Beck"
   git config --global user.email 'sbeck@cpan.org'

   git commit -a -m 'Bump Locale-Codes from 3.15 to 3.16'
   git format-patch origin
   mv 0001* /tmp

Modify the patch to include the correct email address at the top
(and make sure it didn't modify Porters/Maintainers.pl except
for my change). Also, make sure there are no permission changes
in the patch.

   ./Configure -des -Dusedevel
   make test

and make sure that the tests all succeed. Then submit the patch.
