Rev 7550 | Rev 14348 | Go to most recent revision | 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 |
||
15 | |||
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 |
||
34 | |||
23 | reyssat | 35 | !if $m1=local |
36 | local=yes |
||
37 | !endif |
||
7550 | bpr | 38 | !if $i_domain=$empty or $i_keywords=$empty |
39 | rep=ERROR domain_keyword $mod |
||
40 | !goto end |
||
41 | !endif |
||
3151 | bpr | 42 | !if $mcnt!=3 or $m1 notitemof $zonepublishs |
23 | reyssat | 43 | rep=ERROR unpublishable $mod |
3151 | bpr | 44 | unpublishable_site=$submitpublish_site |
45 | !reset submitpublish_site |
||
23 | reyssat | 46 | !goto end |
47 | !endif |
||
48 | |||
49 | !if $mod=$empty |
||
50 | job=modname |
||
51 | !changeto $job.proc |
||
52 | !endif |
||
53 | |||
2708 | guerimand | 54 | 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 |
55 | tmp2=!items2words $tmp |
||
56 | tmp2=!nospace $tmp2 |
||
57 | wver1=$wims_version |
||
23 | reyssat | 58 | Wver2=!module wims_version devel/$auth_login/$mod |
2708 | guerimand | 59 | wver2=$Wver2 |
60 | !for k=1 to 2 |
||
61 | l0=!text select $tmp2 in $(wver$k) |
||
62 | l=!positionof item $l0 in $tmp |
||
63 | l=$[100+$l] |
||
64 | wver$k=!replace internal $l0 by $l in $(wver$k) |
||
65 | !next k |
||
23 | reyssat | 66 | !bound vcheat within yes,no default $ |
67 | !if $wver2<$wver1 |
||
68 | !if $vcheat=$empty |
||
69 | askcheat=yes |
||
70 | !exit |
||
71 | !else |
||
72 | !if $vcheat=yes |
||
73 | cheatversion=$Wver2 |
||
74 | !else |
||
75 | !setdef wims_version=$wims_version in wimshome/public_html/modules/devel/$auth_login/$mod/INDEX |
||
76 | !endif |
||
77 | !endif |
||
78 | !else |
||
79 | !if $wver2>$wver1 |
||
80 | rep=ERROR antiwversion $Wver2 |
||
81 | !goto end |
||
82 | !endif |
||
83 | !endif |
||
84 | |||
85 | !if $confirm!=yes |
||
86 | pubprep=yes |
||
87 | !exit |
||
88 | !endif |
||
89 | target=!translate internal ~ to / in $mod |
||
90 | thisver=!module version devel/$auth_login/$mod |
||
91 | oldver=!module version $target |
||
92 | !if $oldver!=$empty and $thisver <= $oldver and \ |
||
93 | ($submittype != devel or $m1 = local) |
||
94 | rep=ERROR please-update-module-version |
||
95 | !goto end |
||
96 | !endif |
||
97 | |||
98 | !default cheatversion=$wims_version |
||
99 | !if $m1=local |
||
100 | nopublish=!items2words $wims_busyhours |
||
101 | nopublish=!singlespace $nopublish |
||
102 | nopublish=!text select 0123456789 $ in $nopublish |
||
103 | thishour=!char 10,11 of $wims_now |
||
104 | !if $nopublish != $empty and $thishour iswordof $nopublish |
||
105 | rep=ERROR badhour |
||
106 | !goto end |
||
107 | !endif |
||
108 | publishers=!sh cat $wims_home/log/.devpublishers |
||
109 | !if $auth_login notitemof $publishers |
||
110 | rep=ERROR nolocalright |
||
111 | !goto end |
||
112 | !endif |
||
113 | today=!char 1 to 8 of $wims_now |
||
114 | !if $oldver=$empty |
||
115 | !appendfile wimshome/modules/Changelog.new $today: $target $thisver |
||
116 | !else |
||
117 | !if $thisver>$oldver |
||
118 | !appendfile wimshome/modules/Changelog.modif $today: $target $thisver |
||
119 | !endif |
||
120 | !endif |
||
121 | !sh cd modules\ |
||
122 | rm -fR $target\ |
||
123 | mkdir -p `dirname $target`\ |
||
124 | cp -pR devel/$auth_login/$mod $target\ |
||
125 | find $target ! \( -type f -o -type d \) -exec rm -f '{}' \;\ |
||
126 | cd $wims_home\ |
||
127 | [ -d /wsys/wims ] && touch log/newmodules\ |
||
128 | date '+%Y-%m-%d.%H:%M:%S' >tmp/mkindex.log\ |
||
129 | echo "Building module index..." >>tmp/mkindex.log\ |
||
130 | bin/mkindex >>tmp/mkindex.log |
||
131 | rep=OK copied to $target |
||
132 | !else |
||
133 | !if $submitauth=$empty or $submitpass=$empty |
||
134 | pubprep=yes |
||
135 | !exit |
||
136 | !endif |
||
137 | !read scripts/publish |
||
138 | !endif |
||
139 | |||
140 | :end |
||
141 | status=!word 1 of $rep |
||
2819 | bpr | 142 | status2=$rep |
23 | reyssat | 143 | !if $status notwordof OK ERROR |
2819 | bpr | 144 | !if length limit isin $status2 |
145 | rep=ERROR lengthlimit |
||
146 | !else |
||
147 | rep=ERROR noreply |
||
148 | !endif |
||
23 | reyssat | 149 | !goto end |
150 | !endif |
||
151 | rep=!trim $rep |
||
152 | sl=!charcnt $status |
||
153 | rep2=!char $sl+1 to -1 of $rep |
||
3009 | bpr | 154 | wims_module_log=publish $submitauth/$mod $submittype $status $submitpublish_site |