source: tol/tol_pkg/_uploader.tol @ fbcf38a

1941-docker-image-to-testdevel
Last change on this file since fbcf38a was eaa41f7, checked in by Víctor de Buen <vdebuen@…>, 17 years ago

Separating local install from remote upload

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@1794 be4846ae-f051-483a-831f-b64e7d08527f

  • Property mode set to 100644
File size: 2.5 KB
Line 
1//////////////////////////////////////////////////////////////////////////////
2// FILE    : uploader.tol
3// PURPOSE : call all prepared tests about TOL features checking are binding
4// to decide if a version should be published or not.
5//////////////////////////////////////////////////////////////////////////////
6
7Set Include("_install_tools.tol");
8
9//Text compress = "\"c:\Archivos de programa\7-Zip\7z.exe\" a -r -tzip ";
10Text compress = " ";
11Text tolpkg = TmpDir+"tol_pkg/";
12Text local = ".";
13Text export = tolpkg+"export";
14Text upload = tolpkg+"tol_pkg/"+version;
15
16Real OSDirRemove(tolpkg);
17Real OSDirMake(tolpkg);
18Real OSDirMake(upload);
19
20Real OSCmdWaitWr("svn export --force "
21  "https://www.tol-project.org/svn/tolp/trunk/tol_pkg \""+export+"\"");
22 
23Text SetOfTextToWikiList(Set set, Text margin, Text quote)
24{
25  If(Card(set)==1,quote+set[1]+quote,
26  SetSum(For(1,Card(set),Text(Real k)
27  {
28    margin+quote+set[k]+quote
29  })))
30};
31
32
33Real wiki = FOpen(tolpkg+"wiki.txt","wb");
34
35Real FPutText(wiki,ReadFile("_wiki_header.txt"));
36
37Text WriteFile(tolpkg+"compress.bat",
38"cd \""+ReplaceSlash(export)+"\"\n"+
39"zip -9 -r %1.zip %1\n"
40"mv %1.zip ..\\tol_pkg\\"+version+"\n"
41);
42
43Set EvalSet(packages, Real(Text name)
44{
45  Text exp = export+"/"+name;
46  Text upl = upload+"/"+name;
47  Set aux = {[[Include(exp+"/"+name+".tol")]]};
48  NameBlock nb = aux[1][1];
49  Real FPutText(wiki,
50"
51=== !"+name+" ===
52"+nb::_.autodoc.description+"
53 * '''keywords''' : "+SetOfTextToWikiList(nb::_.autodoc.keys," ","__")+"
54 * '''authors''' : "+SetOfTextToWikiList(nb::_.autodoc.authors," ","''")+"
55 * '''links''' : "
56  " ["+name+" Official page]"
57  " [source:/tolp/trunk/tol_pkg/"+name+" view source code]"
58  " [http://packages.tol-project.org/tol_pkg/"+name+".zip download full package]"
59  " [http://packages.tol-project.org/tol_pkg/"+name+".oza download just OIS compressed package]
60");
61  Real Ois.Store(aux[1],upl+".oza");
62  Real OSCmdWaitWr("cp \""+upl+".oza\" \""+ReplaceSlash(tolpkg_install)+"\"");
63  Real OSCmdWaitWr("\""+tolpkg+"compress.bat\" "+name)
64});
65
66Real FClose(wiki);
67
68
69Text remoteUser =
70  "toldevel@tolp.localbayes.es";
71Text remoteRoot =
72  "/var/www/packages";
73
74Text WriteFile(upload+".bat",
75"cd \""+ReplaceSlash(tolpkg+"/tol_pkg")+"\"\n"+
76"tar cvzf "+version+".tgz "+version+"\n"+
77"pscp "+version+".tgz "+remoteUser+":"+remoteRoot+"/tol_pkg/"+version+".tgz\n"
78"plink "+remoteUser+" \"cd "+remoteRoot+"/tol_pkg; ./upload_tol_pkg.sh "+version+"\"\n"
79);
80Real OSCmdWaitWr("\""+ReplaceSlash(upload+".bat")+"\"");
81
82
83
84/* */
Note: See TracBrowser for help on using the repository browser.