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.
./internal/harvest_and_check country
./internal/harvest_and_check language
./internal/harvest_and_check currency
./internal/harvest_and_check script
./internal/harvest_and_check langext
./internal/harvest_and_check langvar
./internal/harvest_and_check langfam
rm -f _init*
rm lib/Locale/Codes/*.bak
#########################################################################
Update documentation
sed -e 's,Locale::Codes::Country,Locale::Country,g' \
lib/Locale/Codes/Country.pod > lib/Locale/Country.pod
sed -e 's,Locale::Codes::Language,Locale::Language,g' \
lib/Locale/Codes/Language.pod > lib/Locale/Language.pod
sed -e 's,Locale::Codes::Currency,Locale::Currency,g' \
lib/Locale/Codes/Currency.pod > lib/Locale/Currency.pod
sed -e 's,Locale::Codes::Script,Locale::Script,g' \
lib/Locale/Codes/Script.pod > lib/Locale/Script.pod
#########################################################################
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
#########################################################################
Set the release version
v=`pwd | sed -e 's,^.*-,,'`
for i in \
Makefile.PL \
Build.PL \
internal/deprecate_codes \
internal/harvest_data \
`find lib -name \*.pm` \
;do
sed -e "s,VERSION *=.*;,VERSION='$v';," $i > z
mv z $i
done
chmod +x internal/deprecate_codes \
internal/dump_curr \
internal/harvest_and_check \
internal/harvest_data \
internal/print_curr_data
#########################################################################
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
#########################################################################
*** MAKE SURE TESTS PASS BEFORE DOING THIS ***
Update the deprecated codes modules. Don't do this until certain that
the changes are good.
./internal/dump_curr
./internal/deprecate_codes
#########################################################################
Update the Change file with the date
#########################################################################
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.
# Watch for problem in lib/Local/Script.pod
cd cpan/Locale-Codes
lcdir=`find ~/perl-modules -type d -name Locale-Codes\*`
new=`echo $lcdir | sed -e 's,^.*-,,'`
old=`echo "$new - 0.01" | bc`
for i in `find . -type f` ;do
if [ ! -e $lcdir/$i ]; then
echo "## Remove: $i"
echo "## git rm $i"
git rm $i
else
cp -p $lcdir/$i $i
fi
done
for file in `cd $lcdir; find . -type f` ;do
tmp=`echo $file | sed -e 's,\(examples\|internal\|.git\)/,,'`
if [ "$tmp" != "$file" -o \
"$tmp" = "./Build.PL" -o \
"$tmp" = "./Changes" -o \
"$tmp" = "./INSTALL" -o \
"$tmp" = "./LICENSE" -o \
"$tmp" = "./MANIFEST" -o \
"$tmp" = "./META.json" -o \
"$tmp" = "./META.yml" -o \
"$tmp" = "./Makefile.PL" -o \
"$tmp" = "./README" -o \
"$tmp" = "./README.first" -o \
"$tmp" = "./.travis.yml" -o \
"$tmp" = "./t/runtests.bat" -o \
"$tmp" = "./t/runtests" -o \
"$tmp" = "./t/pod.t" -o \
"$tmp" = "./t/pod_coverage.t" -o \
"$tmp" = "./t/pod_coverage.ign" \
]; then
continue
fi
if [ ! -e $file ]; then
echo "## Added: $file"
echo "## cp -p $lcdir/$file $file"
#cp -p $lcdir/$file $file
echo "## git add $file"
#git add $file
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 $old to $new"
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.
cat <<EOF;
====
To: perl5-porters@perl.org
Subject: PATCH: Bump Locale-Codes from $old to $new
I just released Locale-Codes-$new which contains the core modules Locale::Country, Locale::Language, and Locale::Currency. Due to the size of the patch (due to changes in codes), I'm including a link here instead of sending it as an attachment:
http://sullybeck.com/0001-Bump-Locale-Codes-from-$old-to-$new.patch
OR
I just released Locale-Codes-$new which contains the core modules Locale::Country, Locale::Language, and Locale::Currency. The patch is attached here.
====
Background:
The core modules Locale::Country, Locale::Language, and Locale::Currency (all part of the Locale-Codes distribution) should be updated on a regular basis. They contain "codes" from various internet standards which change over time.
I plan on releasing new versions at 4 times a year to keep the codes up-to-date. At this point, I'm not planning on any significant code changes (other than bug fixes), so the only significant changes between releases should be to update the codes.
EOF