Update release scripts and docs to reflect .gitattributes use.
It is no longer required to use svn-find-native-eols.pl now that .gitattributes are in place to ensure correct EOLs in various files. Closes #15584
This commit is contained in:
parent
164d5dbb37
commit
dd4c208148
@ -1,89 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This is the script used by VZ to make wxWidgets releases. It is unofficial
|
||||
# because it must be ran from git-svn repository and not the official svn one
|
||||
# and relies on having a recent Perl installation. But it has the advantage of
|
||||
# being very simple because git knows which files should be included in the
|
||||
# distribution and we don't need to maintain the list of them ourselves but we
|
||||
# also don't run the risk of including anything unwanted.
|
||||
#
|
||||
# Another prerequisite for using it is to create the list of files to be
|
||||
# converted to DOS EOLs for Windows distribution, it must exist in the parent
|
||||
# directory and be called eol-native. This can be done using the companion
|
||||
# svn-find-native-eols.pl script. And will only need to be redone when
|
||||
# svn:eol-style property changes for any files (most likely because it will be
|
||||
# set for a newly added file).
|
||||
#
|
||||
# To summarize, here are the steps to create the release:
|
||||
#
|
||||
# % cd $svn
|
||||
# % $git/build/tools/svn-find-native-eols.pl > $git/../eol-native
|
||||
# % cd $git
|
||||
# % git svn tag WX_x_y_z
|
||||
# % ./build/tools/git-make-release x.y.z
|
||||
# % ... upload ../wxWidgets-x.y.z.{7z,tar.bz2,zip} ...
|
||||
#
|
||||
# If anything is wrong and some minor fixes are required, only the last two
|
||||
# steps (tagging and git-make-release) must be repeated.
|
||||
|
||||
version=$1
|
||||
if [ -z "$version" ]; then
|
||||
echo "Must specify the distribution version." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
EOL_FILE=../eol-native
|
||||
if [ ! -r "$EOL_FILE" ]; then
|
||||
echo "Use build/tools/svn-find-native-eols.pl to generate $EOL_FILE." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! git diff --quiet; then
|
||||
echo "Working copy has modifications, commit or stash them." >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
prefix=wxWidgets-$version
|
||||
destdir=$(dirname $(readlink -f $0))/../../../$prefix
|
||||
|
||||
cleanup() {
|
||||
rm -rf $destdir
|
||||
}
|
||||
|
||||
trap cleanup INT TERM EXIT
|
||||
|
||||
cleanup
|
||||
|
||||
git archive --prefix=$prefix/ HEAD | (cd ..; tar x)
|
||||
cd ..
|
||||
# All setup0.h files are supposed to be renamed to just setup.h when checked
|
||||
# out and in the distribution.
|
||||
find $prefix/include/wx -type f -name setup0.h | while read f; do
|
||||
mv $f ${f%0.h}.h
|
||||
done
|
||||
|
||||
# Compile gettext catalogs.
|
||||
make -C $prefix/locale allmo
|
||||
|
||||
tar cjf $prefix.tar.bz2 $prefix
|
||||
|
||||
cd $prefix
|
||||
set +x
|
||||
for f in `cat $EOL_FILE`; do
|
||||
case $f in
|
||||
*/setup0.h)
|
||||
# we renamed this file above so adjust
|
||||
f=${f%0.h}.h
|
||||
;;
|
||||
esac
|
||||
unix2dos -q $f
|
||||
done
|
||||
set -x
|
||||
|
||||
zip -q -r ../$prefix.zip .
|
||||
|
||||
7z a ../$prefix.7z . >/dev/null
|
||||
7z a ../${prefix}_headers.7z include >/dev/null
|
58
build/tools/git-make-release.sh
Executable file
58
build/tools/git-make-release.sh
Executable file
@ -0,0 +1,58 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This is the official script used to make wxWidgets releases.
|
||||
#
|
||||
# We use the git export features to track which files should be included in the
|
||||
# distribution and we don't need to maintain the list of them ourselves but we
|
||||
# also don't run the risk of including anything unwanted.
|
||||
#
|
||||
# To summarize, here are the steps to create the release:
|
||||
#
|
||||
# % git svn tag WX_x_y_z
|
||||
# % ./build/tools/git-make-release.sh x.y.z
|
||||
# % ... upload ../wxWidgets-x.y.z.{7z,tar.bz2,zip} ...
|
||||
|
||||
version=$1
|
||||
if [ -z "$version" ]; then
|
||||
echo "Must specify the distribution version." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! git diff --quiet; then
|
||||
echo "Working copy has modifications, commit or stash them." >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
prefix=wxWidgets-$version
|
||||
destdir=$(dirname $(readlink -f $0))/../../../$prefix
|
||||
|
||||
cleanup() {
|
||||
rm -rf $destdir
|
||||
}
|
||||
|
||||
trap cleanup INT TERM EXIT
|
||||
|
||||
cleanup
|
||||
|
||||
git archive --prefix=$prefix/ HEAD | (cd ..; tar x)
|
||||
cd ..
|
||||
# All setup0.h files are supposed to be renamed to just setup.h when checked
|
||||
# out and in the distribution.
|
||||
find $prefix/include/wx -type f -name setup0.h | while read f; do
|
||||
mv $f ${f%0.h}.h
|
||||
done
|
||||
|
||||
# Compile gettext catalogs.
|
||||
make -C $prefix/locale allmo
|
||||
|
||||
tar cjf $prefix.tar.bz2 $prefix
|
||||
|
||||
cd $prefix
|
||||
|
||||
zip -q -r ../$prefix.zip .
|
||||
|
||||
7z a ../$prefix.7z . >/dev/null
|
||||
7z a ../${prefix}_headers.7z include >/dev/null
|
@ -1,36 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# This script produces the list of all files using native svn:eol-style.
|
||||
#
|
||||
# It's used as a helper for distribution creation as this is also the
|
||||
# list of files which need to have their line endings converted for
|
||||
# the use on the platform other than the current one.
|
||||
#
|
||||
# Notice that the script requires Perl 5.10 (which could be easily avoided but
|
||||
# as this is for my personal use mostly so far, I didn't bother) and Perl svn
|
||||
# bindings.
|
||||
use 5.10.0;
|
||||
use strict;
|
||||
use warnings;
|
||||
use SVN::Client;
|
||||
|
||||
# Normally we get the list directly from the server but this is slow,
|
||||
# so if you already have an (up to date!) svn checkout, you can also
|
||||
# pass a path to it here, the script will work much faster then.
|
||||
my $root = $ARGV[0] // 'https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk';
|
||||
|
||||
my $ctx = SVN::Client->new
|
||||
or die "Failed to create svn context, do you have svn auth stored?\n";
|
||||
|
||||
my $props = $ctx->proplist($root, undef, 1)
|
||||
or die "Failed to list properties for files under $root.\n";
|
||||
|
||||
foreach my $prop (@$props) {
|
||||
my $eol = ${$prop->prop_hash()}{'svn:eol-style'};
|
||||
if ( defined $eol && ($eol eq 'native') ) {
|
||||
my $rel = $prop->node_name();
|
||||
substr($rel, 0, length($root) + 1, ''); # +1 for leading slash
|
||||
|
||||
say $rel;
|
||||
}
|
||||
}
|
@ -26,17 +26,13 @@ Creating release files
|
||||
Follow these steps assuming the current working directory is the root of git
|
||||
working copy and you want to prepare distribution for the version x.y.z:
|
||||
|
||||
1. Run `./build/tools/svn-find-native-eols.pl > ../eol-native` (if you have
|
||||
an existing svn checkout, pass it to the script to make it run much faster,
|
||||
but take care to have up to date sources in the working tree).
|
||||
|
||||
2. Run `./build/tools/git-make-release x.y.z` to create source archives
|
||||
1. Run `./build/tools/git-make-release.sh x.y.z` to create source archives
|
||||
../wxWidgets-x.y.z.{7z,tar.bz2,zip} and wxWidgets_x.y.z_Headers.zip.
|
||||
|
||||
3. Run `./build/tools/make-html-docs x.y.z` to create HTML documentation
|
||||
2. Run `./build/tools/make-html-docs.sh x.y.z` to create HTML documentation
|
||||
archives ../wxWidgets-x.y.z.{tar.bz2,zip}
|
||||
|
||||
4. This step must be done under Windows as it relies on having hhc.exe, the
|
||||
3. This step must be done under Windows as it relies on having hhc.exe, the
|
||||
Html Help compiler, in PATH: run the following commands
|
||||
|
||||
```
|
||||
@ -46,7 +42,7 @@ working copy and you want to prepare distribution for the version x.y.z:
|
||||
zip ..\..\..\wxWidgets-x.y.z-docs-chm.zip wx.chm
|
||||
```
|
||||
|
||||
5. This step also must be done under Windows as it uses Inno Setup to produce
|
||||
4. This step also must be done under Windows as it uses Inno Setup to produce
|
||||
the .exe file and it also requires the CHM file built above:
|
||||
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user