Print this page
6339 env file could figure out CODEMGR_WS automatically

@@ -45,25 +45,13 @@
 # - This script is only interpreted by ksh93 and explicitly allows the
 #   use of ksh93 language extensions.
 #
 export NIGHTLY_OPTIONS='-FnCDAlmprt'
 
-#
-# -- PLEASE READ THIS --
-#
-# The variables  GATE and CODEMGR_WS must always be customised to
-# match your workspace/gate location!!
-#
-# -- PLEASE READ THIS --
-#
-
-# This is a variable for the rest of the script - GATE doesn't matter to
-# nightly itself
-export GATE='testws'
-
-# CODEMGR_WS - where is your workspace at (or what should nightly name it)
-export CODEMGR_WS="$HOME/ws/$GATE"
+# CODEMGR_WS - where is your workspace at
+#export CODEMGR_WS="$HOME/ws/illumos-gate"
+export CODEMGR_WS="`git rev-parse --show-toplevel`"
 
 # Maximum number of dmake jobs.  The recommended number is 2 + NCPUS,
 # where NCPUS is the number of logical CPUs on your build system.
 function maxjobs
 {

@@ -158,11 +146,11 @@
 #       build environment variables, including version info for mcs, motd,
 # motd, uname and boot messages. Mostly you shouldn't change this except
 # when the release slips (nah) or you move an environment file to a new
 # release
 #
-export VERSION="$GATE"
+export VERSION="`git describe --long --all HEAD | cut -d/ -f2-`"
 
 #
 # the RELEASE and RELEASE_DATE variables are set in Makefile.master;
 # there might be special reasons to override them here, but that
 # should not be the case in general