Subversion Repositories wimsdev

Rev

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