Subversion Repositories wimsdev

Rev

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