Rev 14705 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | |
2 | i_title=!module title devel/$auth_login/$mod |
||
3 | mname=!translate internal ~ to , in $mod |
||
4 | mname=!nonempty items $mname |
||
5 | mcnt=!itemcnt $mname |
||
6 | !distribute items $mname into m1,m2,m3 |
||
7 | mdir=$m1/$m2 |
||
8 | mname=$m3 |
||
7550 | bpr | 9 | |
10 | !!check domain |
||
11 | i_domain=!module domain devel/$auth_login/$mod |
||
12 | i_domain=!nonempty items $i_domain |
||
13 | i_keywords=!module keywords devel/$auth_login/$mod |
||
14 | i_keywords=!nonempty items $i_keywords |
||
14521 | bpr | 15 | i_level=!module level devel/$auth_login/$mod |
8620 | bpr | 16 | !reset dombad domgood keywordsgood keywordsbad |
7550 | bpr | 17 | !for cd in $i_domain |
18 | check_domain=!lookup $cd in wimshome/public_html/bases/sys/domain/reversedomain |
||
19 | !if $check_domain =$empty |
||
20 | dombad=!append item $cd to $dombad |
||
21 | !else |
||
22 | domgood=!append item $cd to $domgood |
||
23 | !endif |
||
24 | !next |
||
25 | |||
8620 | bpr | 26 | !for cd in $i_keywords |
27 | check_domain=!lookup $cd in wimshome/public_html/bases/sys/domain/reversedomain |
||
28 | !if $check_domain =$empty |
||
29 | keywordsbad=!append item $cd to $keywordsbad |
||
30 | !else |
||
31 | keywordsgood=!append item $cd to $keywordsgood |
||
32 | !endif |
||
33 | !next |
||
14522 | bpr | 34 | target=!translate internal ~ to / in $mod |
35 | !!check NEWS |
||
14691 | bpr | 36 | oldver=!module version $target |
37 | !if $oldver!=$empty |
||
38 | check_news=!sh cd modules\ |
||
39 | diff -bB $wims_home/public_html/modules/$target/NEWS $wims_home/public_html/modules/devel/$auth_login/$mod/NEWS |
||
40 | !if $check_news issametext $empty |
||
41 | changenews=no |
||
42 | !endif |
||
14522 | bpr | 43 | !endif |
23 | reyssat | 44 | !if $m1=local |
45 | local=yes |
||
46 | !endif |
||
7550 | bpr | 47 | !if $i_domain=$empty or $i_keywords=$empty |
48 | rep=ERROR domain_keyword $mod |
||
49 | !goto end |
||
50 | !endif |
||
3151 | bpr | 51 | !if $mcnt!=3 or $m1 notitemof $zonepublishs |
14348 | bpr | 52 | rep=ERROR unpublishable $mod |
53 | unpublishable_site=$submitpublish_site |
||
54 | !reset submitpublish_site |
||
55 | !goto end |
||
23 | reyssat | 56 | !endif |
57 | |||
58 | !if $mod=$empty |
||
14348 | bpr | 59 | job=modname |
60 | !changeto $job.proc |
||
23 | reyssat | 61 | !endif |
62 | |||
2708 | guerimand | 63 | tmp=a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z |
64 | tmp2=!items2words $tmp |
||
65 | tmp2=!nospace $tmp2 |
||
66 | wver1=$wims_version |
||
23 | reyssat | 67 | Wver2=!module wims_version devel/$auth_login/$mod |
2708 | guerimand | 68 | wver2=$Wver2 |
69 | !for k=1 to 2 |
||
70 | l0=!text select $tmp2 in $(wver$k) |
||
71 | l=!positionof item $l0 in $tmp |
||
72 | l=$[100+$l] |
||
73 | wver$k=!replace internal $l0 by $l in $(wver$k) |
||
74 | !next k |
||
23 | reyssat | 75 | !bound vcheat within yes,no default $ |
76 | !if $wver2<$wver1 |
||
14348 | bpr | 77 | !if $vcheat=$empty |
78 | askcheat=yes |
||
79 | !exit |
||
23 | reyssat | 80 | !else |
14348 | bpr | 81 | !if $vcheat=yes |
82 | cheatversion=$Wver2 |
||
83 | !else |
||
84 | !setdef wims_version=$wims_version in wimshome/public_html/modules/devel/$auth_login/$mod/INDEX |
||
85 | !endif |
||
23 | reyssat | 86 | !endif |
87 | !else |
||
14348 | bpr | 88 | !if $wver2>$wver1 |
89 | rep=ERROR antiwversion $Wver2 |
||
90 | !goto end |
||
91 | !endif |
||
23 | reyssat | 92 | !endif |
93 | |||
94 | !if $confirm!=yes |
||
14348 | bpr | 95 | pubprep=yes |
96 | !exit |
||
23 | reyssat | 97 | !endif |
98 | target=!translate internal ~ to / in $mod |
||
99 | thisver=!module version devel/$auth_login/$mod |
||
100 | oldver=!module version $target |
||
101 | !if $oldver!=$empty and $thisver <= $oldver and \ |
||
14348 | bpr | 102 | ($submittype != devel or $m1 = local) |
103 | rep=ERROR please-update-module-version |
||
104 | !goto end |
||
23 | reyssat | 105 | !endif |
106 | |||
107 | !default cheatversion=$wims_version |
||
108 | !if $m1=local |
||
14348 | bpr | 109 | nopublish=!items2words $wims_busyhours |
110 | nopublish=!singlespace $nopublish |
||
111 | nopublish=!text select 0123456789 $ in $nopublish |
||
112 | thishour=!char 10,11 of $wims_now |
||
113 | !if $nopublish != $empty and $thishour iswordof $nopublish |
||
114 | rep=ERROR badhour |
||
115 | !goto end |
||
23 | reyssat | 116 | !endif |
14348 | bpr | 117 | publishers=!sh cat $wims_home/log/.devpublishers |
118 | !if $auth_login notitemof $publishers |
||
119 | rep=ERROR nolocalright |
||
120 | !goto end |
||
121 | !endif |
||
122 | today=!char 1 to 8 of $wims_now |
||
123 | !if $oldver=$empty |
||
124 | !appendfile wimshome/modules/Changelog.new $today: $target $thisver |
||
125 | !else |
||
126 | !if $thisver>$oldver |
||
127 | !appendfile wimshome/modules/Changelog.modif $today: $target $thisver |
||
128 | !endif |
||
23 | reyssat | 129 | !endif |
130 | !sh cd modules\ |
||
14348 | bpr | 131 | rm -fR $target\ |
132 | mkdir -p `dirname $target`\ |
||
133 | cp -pR devel/$auth_login/$mod $target\ |
||
134 | find $target ! \( -type f -o -type d \) -exec rm -f '{}' \;\ |
||
135 | cd $wims_home\ |
||
136 | [ -d /wsys/wims ] && touch log/newmodules\ |
||
137 | date '+%Y-%m-%d.%H:%M:%S' >tmp/mkindex.log\ |
||
138 | echo "Building module index..." >>tmp/mkindex.log\ |
||
139 | bin/mkindex >>tmp/mkindex.log |
||
140 | rep=OK copied to $target |
||
23 | reyssat | 141 | !else |
14348 | bpr | 142 | !if $submitauth=$empty or $submitpass=$empty |
143 | pubprep=yes |
||
144 | !exit |
||
145 | !endif |
||
15281 | obado | 146 | rep=!mexec scripts/submit.sh |
23 | reyssat | 147 | !endif |
148 | |||
149 | :end |
||
150 | status=!word 1 of $rep |
||
2819 | bpr | 151 | status2=$rep |
23 | reyssat | 152 | !if $status notwordof OK ERROR |
14348 | bpr | 153 | !if length limit isin $status2 |
154 | rep=ERROR lengthlimit |
||
155 | !else |
||
156 | rep=ERROR noreply |
||
157 | !endif |
||
158 | !goto end |
||
23 | reyssat | 159 | !endif |
160 | rep=!trim $rep |
||
161 | sl=!charcnt $status |
||
162 | rep2=!char $sl+1 to -1 of $rep |
||
3009 | bpr | 163 | wims_module_log=publish $submitauth/$mod $submittype $status $submitpublish_site |