Return-Path: Delivered-To: apmail-buildr-users-archive@www.apache.org Received: (qmail 28430 invoked from network); 23 Feb 2009 08:45:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Feb 2009 08:45:55 -0000 Received: (qmail 85974 invoked by uid 500); 23 Feb 2009 08:45:54 -0000 Delivered-To: apmail-buildr-users-archive@buildr.apache.org Received: (qmail 85947 invoked by uid 500); 23 Feb 2009 08:45:54 -0000 Mailing-List: contact users-help@buildr.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@buildr.apache.org Delivered-To: mailing list users@buildr.apache.org Received: (qmail 85936 invoked by uid 99); 23 Feb 2009 08:45:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Feb 2009 00:45:54 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [80.190.253.131] (HELO mail.baseserver.net) (80.190.253.131) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Feb 2009 08:45:46 +0000 Received: from [192.168.2.164] (unknown [195.180.2.195]) by mail.baseserver.net (Postfix) with ESMTP id DBE049B25A for ; Mon, 23 Feb 2009 09:45:23 +0100 (CET) Subject: Re: Setting BUILDR_ENV in buildfile has no effect on chosen settings.profile From: Martin Grotzke To: users@buildr.apache.org In-Reply-To: <3de5d7d20902230023l206147edp41ec8724bd453f20@mail.gmail.com> References: <1235340027.4056.23.camel@localhost.localdomain.tld> <3de5d7d20902230023l206147edp41ec8724bd453f20@mail.gmail.com> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-gBtE4w/xad0UYk0o2Rgd" Date: Mon, 23 Feb 2009 09:45:19 +0100 Message-Id: <1235378719.5146.6.camel@localhost.localdomain.tld> Mime-Version: 1.0 X-Mailer: Evolution 2.24.4 (2.24.4-1.fc10) X-Virus-Checked: Checked by ClamAV on apache.org --=-gBtE4w/xad0UYk0o2Rgd Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Mon, 2009-02-23 at 00:23 -0800, Assaf Arkin wrote: > On Sun, Feb 22, 2009 at 2:00 PM, Martin Grotzke < > martin.grotzke@javakaffee.de> wrote: >=20 > > Hi, > > > > the documentation [1] says > > > > "You can also set environment variables from within your Buildfile. > > [..] Make sure to set any environment variables at the very top of > > the Buildfile, above any Ruby statement (even require)." > > > > > > I tried this with adding > > > > ENV['BUILDR_ENV'] =3D 'test' > > > > to the top of my buildfile to set the default profile to 'test'. > > Unfortunately, still the 'development' profile is used (it's printed in > > the very first line after running buildr and I see the 'development' > > profile is applied). > > > > Should setting the 'BUILDR_ENV' variable in the buildfile work, or is i= t > > just a documentation issue (because it's not meant to work for the > > environment environment variable)? >=20 >=20 > Not supposed to work for BUILDR_ENV. This environment variable is used > before the buildfile is loaded. Ok, thanx for the info. Cheers, Martin >=20 > http://buildr.apache.org/settings_profiles.html#environments >=20 > It shows the two supported ways for setting the environment. You might ha= ve > to wrap Buildr with another script that does something like: >=20 > buildr -e $HOSTNAME >=20 > Assaf >=20 >=20 > > > > > > Btw, what I really want to do: we're using profiles for our development > > machines, with a profile for each machine/hostname, inheriting a common > > profile (like development). Therefore I'd like to initialize the buildr > > environment with s.th. like > > > > ENV['BUILDR_ENV'] ||=3D ENV['HOSTNAME'] > > > > This just if you wonder why the hell I want to set the default profile > > to 'test' ;) > > > > Thanx && cheers, > > Martin > > > > > > [1] http://buildr.apache.org/settings_profiles.html#environment_variabl= es > > > > --=-gBtE4w/xad0UYk0o2Rgd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAkmiYh8ACgkQ7FvOl7Te+pZmcQCgn8QnTVQHwU/9HV3SddrT4OJJ ijIAnis2oiInLUMNJdTFnlcf/Arh6HC/ =YQn8 -----END PGP SIGNATURE----- --=-gBtE4w/xad0UYk0o2Rgd--