Subversion Repositories wimsdev

Rev

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