[LON-CAPA-cvs] cvs: loncom /build install_web_site_cronjob

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 12 Sep 2002 20:40:30 -0000


albertel		Thu Sep 12 16:40:30 2002 EDT

  Modified files:              
    /loncom/build	install_web_site_cronjob 
  Log:
  - changing how and where it gets the current version number
  - changing what is in the unstable tarball, It is now more inclusive of files
  
  
  
Index: loncom/build/install_web_site_cronjob
diff -u loncom/build/install_web_site_cronjob:1.2 loncom/build/install_web_site_cronjob:1.3
--- loncom/build/install_web_site_cronjob:1.2	Thu Aug 15 10:41:10 2002
+++ loncom/build/install_web_site_cronjob	Thu Sep 12 16:40:30 2002
@@ -23,12 +23,16 @@
 13 16 * * *    /home/loninst/auto/install_web_site_cronjob
 
 The main goal of B<install_web_site_cronjob> is to periodically produce the
-tarball needed for LON-CAPA installation.
+unstable tarball needed for LON-CAPA installation.
 
 A secondary yet important function of B<install_web_site_cronjob> is that it
 also refreshes the documentation present on the install.lon-capa.org
 web site.
 
+It does depend on a file name LATEST-IS-something, where something is
+the latest release of loncapa, that file should also contain a string
+that will be used to date the release.
+
 The coding of this script is a strange brew of shell commands
 with perl.
 
@@ -39,8 +43,8 @@
 =cut
 
 # --------------------------------------------- Making the tarball distribution
-`cd /home/loninst/auto; export CVS_PASSFILE=/home/loninst/.cvspass; export CVSROOT=:pserver:scott\@localhost:/home/cvs; rm -Rf loncapa/[C][^V]*; rm -Rf loncapa/[^C]*; cvs -Q co loncapa; cd loncapa/loncom/build; make build 2>/dev/null; make tardist;`;
-
+#`cd /home/loninst/auto; export CVS_PASSFILE=/home/loninst/.cvspass; export CVSROOT=:pserver:scott\@localhost:/home/cvs; rm -Rf loncapa/[C][^V]*; rm -Rf loncapa/[^C]*; cvs -Q co loncapa; cd loncapa/loncom/build; make build 2>/dev/null; make tardist;`;
+`cd /home/loninst/auto; export CVS_PASSFILE=/home/loninst/.cvspass; export CVSROOT=:pserver:scott\@localhost:/home/cvs; rm -Rf loncapa-unstable; rm -Rf loncapa; cvs -Q export -r HEAD loncapa; ln -s loncapa loncapa-unstable; tar cvvf loncapa-unstable.tar loncapa-unstable/* ;gzip -9 -f loncapa-unstable.tar`;
 # ---------------------------------------- Dynamically generating documentation
 `cd /home/loninst/auto/loncapa/loncom/build; make pdfdoc`;
 `cd /home/loninst/auto/loncapa/loncom/build; make doc`;
@@ -48,13 +52,21 @@
 `cd /home/loninst/public_html/docs; tar xzf docs.tar.gz`;
 
 # ------------------------------------ Copying over the latest unstable tarball
-my $filename=`cd /home/loninst/auto; find loncapa -type f -name *.tar.gz -maxdepth 1`;
+#my $filename=`cd /home/loninst/auto; find loncapa -type f -name *.tar.gz -maxdepth 1`;
+#chomp($filename);
+#$filename=~/loncapa\/loncapa\-(.*?)\.tar\.gz/;
+#my $version=$1;
+`cd /home/loninst/auto; cp -f loncapa-unstable.tar.gz ../public_html/versions/loncapa-unstable.tar.gz`;
+#`cd /home/loninst/public_html/versions; rm -f loncapa-unstable.tar.gz; ln -s loncapa-$version-unstable.tar.gz loncapa-unstable.tar.gz`;
+
+#get latest version
+my $filename=`cd /home/loninst/public_html/versions; find . -type f -name LATEST-IS-* -maxdepth 1`;
 chomp($filename);
-$filename=~/loncapa\/loncapa\-(.*?)\.tar\.gz/;
+$filename=~/LATEST-IS-(.*)/;
 my $version=$1;
-`cd /home/loninst/auto; cp -f loncapa/loncapa-$version.tar.gz ../public_html/versions/loncapa-$version-unstable.tar.gz`;
-`cd /home/loninst/public_html/versions; rm -f loncapa-unstable.tar.gz; ln -s loncapa-$version-unstable.tar.gz loncapa-unstable.tar.gz`;
-
+open(IN,"</home/loninst/public_html/versions/$filename");
+my $releasedate=<IN>;
+close(IN);
 # ------------------ Updating the download page with the date of the last build
 open(IN,"</home/loninst/public_html/docs/downloads/index.html");
 my @lines=<IN>;
@@ -62,7 +74,8 @@
 my $date=`date -I`; chomp($date);
 my $text=join('',@lines);
 $text=~s/loncapa-unstable\.tar\.gz\<\/a\>.*?\./loncapa-unstable\.tar\.gz\<\/a\> (generated $date)\./;
-$text=~s/loncapa-current\.tar\.gz\<\/a\>.*?\./loncapa-current\.tar\.gz\<\/a\> (version $version)\./;
+$text=~s/LATESTVERSION/$version/g;
+$text=~s/LATESTDATE/$releasedate/g;
 open(OUT,">/home/loninst/public_html/docs/downloads/index.html");
 print(OUT $text);
 close(OUT);