Subversion Repositories wimsdev

Rev

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