mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Win32 build: remove UPDATE_SOURCES parameter
Developers should manually choose when and how to update their checked out repository. Automated builders can simply write a short wrapper script around the install the does the update for them. The daily_build_git.sh and daily_build.sh scripts are fine examples. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22308 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
283e3e1af6
commit
311e2b4a4d
@ -84,9 +84,6 @@ for tag_rev in $tags ; do
|
||||
echo -n 'GLOBAL_DIR=c:\\soft\\gnucash-' >> ${w32pkg}/custom.sh
|
||||
echo "${tag}" >> ${w32pkg}/custom.sh
|
||||
|
||||
# No need to update the sources we just checked out
|
||||
echo "UPDATE_SOURCES=no" >> ${w32pkg}/custom.sh
|
||||
|
||||
# BUILD_FROM_TARBALL is special:
|
||||
# in install.sh place we check !=yes, in defaults.sh =yes, in dist.sh =no
|
||||
# We want it to look like 'no' in install and defaults, but yes in dist
|
||||
|
@ -1,12 +1,24 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Note: for this script to work, you need to make sure bash can
|
||||
# find svn on your system. If it's not in the default
|
||||
# Windows path, you will have to add it yourself, for
|
||||
# example like this:
|
||||
# - create a file /etc/profile.d/svn.sh
|
||||
# - add this line: export PATH=/c/soft/svn/bin:$PATH
|
||||
# (Use the real path to your svn installation, obviously)
|
||||
# Notes:
|
||||
# 1. for this script to work, you need to make sure bash can
|
||||
# find svn on your system. If it's not in the default
|
||||
# Windows path, you will have to add it yourself, for
|
||||
# example like this:
|
||||
# - create a file /etc/profile.d/svn.sh
|
||||
# - add this line: export PATH=/c/soft/svn/bin:$PATH
|
||||
# (Use the real path to your svn installation, obviously)
|
||||
#
|
||||
# 2. The recommended setup is to call this script from within the
|
||||
# source code repository (packaging/win32 directory). This is
|
||||
# different from before, where it was assumed to be called
|
||||
# from outside the source code repository. To remain some
|
||||
# compatibility with the old way, svn update is called twice
|
||||
# - once for the repository (to update all)
|
||||
# - once for the build scripts (to also update the build scripts
|
||||
# using the old way)
|
||||
# The second invocation is superfluous if this script was called
|
||||
# from within the source code repository.
|
||||
|
||||
set -e
|
||||
|
||||
@ -15,6 +27,14 @@ function qpopd() { popd >/dev/null; }
|
||||
function unix_path() { echo "$*" | sed 's,^\([A-Za-z]\):,/\1,;s,\\,/,g'; }
|
||||
|
||||
qpushd "$(dirname $(unix_path "$0"))"
|
||||
. functions.sh
|
||||
. defaults.sh
|
||||
|
||||
qpushd "$REPOS_DIR"
|
||||
svn update
|
||||
qpopd
|
||||
|
||||
svn update
|
||||
|
||||
./build_package.sh
|
||||
qpopd
|
||||
|
@ -29,10 +29,7 @@ if [ -z "$BUILD_FROM_TARBALL" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# only change this to "yes" if you are using install.sh from the outside the repository checkout
|
||||
set_default UPDATE_SOURCES noyes
|
||||
if [ "$BUILD_FROM_TARBALL" = "yes" ]; then
|
||||
UPDATE_SOURCES=no
|
||||
set_default GNUCASH_DIR "$(wpwd ..\\..)"
|
||||
set_default REPOS_DIR $GNUCASH_DIR
|
||||
# keep this pointing from BUILD_DIR to REPOS_DIR
|
||||
@ -43,7 +40,7 @@ else
|
||||
# keep this pointing from BUILD_DIR to REPOS_DIR
|
||||
set_default REL_REPOS_DIR ..\\repos
|
||||
|
||||
set_default REPOS_TYPE svn
|
||||
set_default REPOS_TYPE "git"
|
||||
if [ "$REPOS_TYPE" = "git" ]; then
|
||||
set_default GIT_REV "trunk"
|
||||
set_default REPOS_URL "git://github.com/Gnucash/gnucash.git"
|
||||
|
@ -1453,46 +1453,6 @@ function inst_hh() {
|
||||
fi
|
||||
}
|
||||
|
||||
function git_up() {
|
||||
mkdir -p $_REPOS_UDIR
|
||||
qpushd $_REPOS_UDIR
|
||||
if [ -x .git ]; then
|
||||
setup "git update in ${REPOS_DIR}"
|
||||
# IMPORTANT: the update mechanism from git
|
||||
# has been kept deliberately simple.
|
||||
#
|
||||
# It assumes you are working as a non-committer
|
||||
# (see http://wiki.gnucash.org/wiki/Git for what that means)
|
||||
# and will simply try to pull the current branch from
|
||||
# the upstream repository.
|
||||
# If you are a committer (and intend to commit from your Windows
|
||||
# git clone) you should disable updates from the build scripts
|
||||
# and manually update using the git-update script.
|
||||
# FIXME the last part needs perl 5.8 and some config tweaks for
|
||||
# perl to find git's Git.pm
|
||||
# msys-dtk installed by default only has perl 5.6.
|
||||
$GIT_CMD pull origin
|
||||
else
|
||||
setup git clone
|
||||
$GIT_CMD clone $REPOS_URL .
|
||||
$GIT_CMD checkout $GIT_REV .
|
||||
fi
|
||||
qpopd
|
||||
}
|
||||
|
||||
function svn_up() {
|
||||
mkdir -p $_REPOS_UDIR
|
||||
qpushd $_REPOS_UDIR
|
||||
if [ -x .svn ]; then
|
||||
setup "svn update in ${REPOS_DIR}"
|
||||
svn up -r ${SVN_REV}
|
||||
else
|
||||
setup svn co
|
||||
svn co -r ${SVN_REV} $REPOS_URL .
|
||||
fi
|
||||
qpopd
|
||||
}
|
||||
|
||||
function inst_cutecash() {
|
||||
setup Cutecash
|
||||
_BUILD_UDIR=`unix_path $CUTECASH_BUILD_DIR`
|
||||
|
@ -111,15 +111,6 @@ add_step inst_enchant
|
||||
add_step inst_webkit
|
||||
|
||||
##
|
||||
if [ "$UPDATE_SOURCES" = "yes" ]; then
|
||||
if [ "$REPOS_TYPE" = "git" ]; then
|
||||
add_step git_up
|
||||
elif [ "$REPOS_TYPE" = "svn" ]; then
|
||||
add_step svn_up
|
||||
else
|
||||
die "Unkown repos type $REPOS_TYPE. Sources can only be updated for git or svn type repos"
|
||||
fi
|
||||
fi
|
||||
if [ "$WITH_CUTECASH" = "yes" ]; then
|
||||
add_step inst_cmake
|
||||
add_step inst_cutecash
|
||||
|
Loading…
Reference in New Issue
Block a user