Subversion Repositories DevTools

Rev

Rev 7358 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7358 Rev 7489
Line 3... Line 3...
3
import java.io.File;
3
import java.io.File;
4
import java.io.FileInputStream;
4
import java.io.FileInputStream;
5
import java.io.FileOutputStream;
5
import java.io.FileOutputStream;
6
import java.io.FileWriter;
6
import java.io.FileWriter;
7
import java.io.IOException;
7
import java.io.IOException;
-
 
8
import java.io.InputStream;
8
import java.util.ArrayList;
9
import java.util.ArrayList;
9
import java.util.HashMap;
10
import java.util.HashMap;
10
import java.util.Iterator;
11
import java.util.Iterator;
11
import java.util.Map;
12
import java.util.Map;
12
import java.util.Properties;
13
import java.util.Properties;
Line 1032... Line 1033...
1032
                //          -baselabel  View label
1033
                //          -baselabel  View label
1033
 
1034
 
1034
                logMsg("publish save build files", WARN);
1035
                logMsg("publish save build files", WARN);
1035
 
1036
 
1036
                File saveinfo = new File(utilities.catDir(basedir, rtagId + "abtinfo.txt"));
1037
                File saveinfo = new File(utilities.catDir(basedir, rtagId + "abtinfo.txt"));
1037
                if ( saveinfo.exists() )
1038
                if ( saveinfo.exists() ) {
1038
                {
-
 
1039
                    saveinfo.delete();
1039
                    saveinfo.delete();
1040
                }
1040
                }
1041
 
1041
 
1042
                command.init("jats" );
1042
                command.init("jats" );
1043
                addCommandLocate();
1043
                addCommandLocate();
Line 1077... Line 1077...
1077
                logMsg("publish read info file", INFO);
1077
                logMsg("publish read info file", INFO);
1078
 
1078
 
1079
                Properties properties = new Properties();
1079
                Properties properties = new Properties();
1080
                try
1080
                try
1081
                {
1081
                {
-
 
1082
                    InputStream inputStream = new FileInputStream(saveinfo);
1082
                    properties.load(new FileInputStream(saveinfo));
1083
                    properties.load(inputStream);
-
 
1084
                    inputStream.close();
1083
                }
1085
                }
1084
                catch (IOException e)
1086
                catch (IOException e)
1085
                {
1087
                {
1086
                    reportErrorException( "Failed to open save_build info file", 262 );
1088
                    reportErrorException( "Failed to open save_build info file", 262 );
1087
                }
1089
                }
Line 1090... Line 1092...
1090
                if ( newVcsTag == null )
1092
                if ( newVcsTag == null )
1091
                {
1093
                {
1092
                    reportErrorException( "Save_build info. Missing property:VCS.tag", 262 );
1094
                    reportErrorException( "Save_build info. Missing property:VCS.tag", 262 );
1093
                }
1095
                }
1094
                logMsg("publish read info file. Label:" + newVcsTag , INFO);
1096
                logMsg("publish read info file. Label:" + newVcsTag , INFO);
-
 
1097
                
-
 
1098
                // Delete the temp file
-
 
1099
                if ( saveinfo.exists() ) {
-
 
1100
                    saveinfo.delete();
-
 
1101
                }
1095
            }
1102
            }
1096
        }
1103
        }
1097
    }
1104
    }
1098
 
1105
 
1099
    /** Re-assemble package fragments into a package within the target archive
1106
    /** Re-assemble package fragments into a package within the target archive
Line 1679... Line 1686...
1679
            {
1686
            {
1680
 
1687
 
1681
                // jats -label check pkgVcsTag
1688
                // jats -label check pkgVcsTag
1682
                command.init("jats", "label","-check" );
1689
                command.init("jats", "label","-check" );
1683
                command.add( packageVcsTag );
1690
                command.add( packageVcsTag );
1684
                //command.add( "-verbose=2" );
-
 
1685
 
1691
 
1686
                runCommand( "Failure to validate label in source control" );
1692
                runCommand( "Failure to validate label in source control" );
1687
                
1693
                
1688
                return;
1694
                return;
1689
            }
1695
            }
Line 1709... Line 1715...
1709
                    command.add( "-label=" + packageVcsTag );
1715
                    command.add( "-label=" + packageVcsTag );
1710
                    command.add( "-root=" + rtagId );
1716
                    command.add( "-root=" + rtagId );
1711
                    command.add( "-tag=" + daemon );
1717
                    command.add( "-tag=" + daemon );
1712
                    command.add( "-noprefix" );
1718
                    command.add( "-noprefix" );
1713
                    command.add(!master, "-extractfiles");
1719
                    command.add(!master, "-extractfiles");
1714
                    //command.add( "-verbose=2" );
-
 
1715
    
1720
    
1716
                    runCommand( "Failure to extract source code from source control" );
1721
                    runCommand( "Failure to extract source code from source control" );
1717
                }
1722
                }
1718
                return;
1723
                return;
1719
            }
1724
            }
Line 1739... Line 1744...
1739
                    command.add( "-root=" + rtagId );
1744
                    command.add( "-root=" + rtagId );
1740
                    command.add( "-tag=" + daemon );
1745
                    command.add( "-tag=" + daemon );
1741
                    command.add( "-noprefix" );
1746
                    command.add( "-noprefix" );
1742
                    command.add(!master, "-extractfiles");
1747
                    command.add(!master, "-extractfiles");
1743
                    command.add( "-delete=2" );
1748
                    command.add( "-delete=2" );
1744
                    //command.add( "-verbose=2" );
-
 
1745
 
1749
 
1746
                    runCommand( "Failure to remove source code extraction" );
1750
                    runCommand( "Failure to remove source code extraction" );
1747
                }
1751
                }
1748
 
1752
 
1749
                //  delete the rtagId directory
1753
                //  delete the rtagId directory
Line 1839... Line 1843...
1839
                    getProject().setProperty("abt_new_vcstag", newVcsTag);
1843
                    getProject().setProperty("abt_new_vcstag", newVcsTag);
1840
                }
1844
                }
1841
 
1845
 
1842
                return;
1846
                return;
1843
            }
1847
            }
-
 
1848
            
-
 
1849
            //-----------------------------------------------------------------------
-
 
1850
            //  AbtBuildInfo
-
 
1851
            //      Not called in Escrow mode
-
 
1852
            //      Should only be called by the master
-
 
1853
            //      Should not need dependent packages to be present
-
 
1854
            //
-
 
1855
            //  Note: Have changed directory to the working directory
-
 
1856
            //
-
 
1857
            if ( packageAlias.compareTo("AbtBuildInfo") == 0 )
-
 
1858
            {
-
 
1859
                if (extractSource)
-
 
1860
                {
-
 
1861
                    genBuildInfo();
-
 
1862
                }
-
 
1863
 
-
 
1864
                return;
-
 
1865
            }
1844
 
1866
 
1845
            //-----------------------------------------------------------------------
1867
            //-----------------------------------------------------------------------
1846
            //    Build Target
1868
            //    Build Target
1847
            //    Note: Have changed directory to the working directory
1869
            //    Note: Have changed directory to the working directory
1848
            //
1870
            //
Line 1892... Line 1914...
1892
                metricsBegin();
1914
                metricsBegin();
1893
                
1915
                
1894
                //  Generate auto.pl or <PackageName>depends.xml file
1916
                //  Generate auto.pl or <PackageName>depends.xml file
1895
                genbuild();
1917
                genbuild();
1896
                
1918
                
1897
                //  Generate BuildInfo
-
 
1898
                genBuildInfo();
-
 
1899
    
-
 
1900
                //  Active build
1919
                //  Active build
1901
                //      Build the target package unless we are simply doing metrics generation
1920
                //      Build the target package unless we are simply doing metrics generation
1902
                //
1921
                //
1903
                if ( !benign )
1922
                if ( !benign )
1904
                {
1923
                {