Subversion Repositories DevTools

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
165 brianf 1
<%
2
'=====================================================
3
'                release_changed.asp
4
'=====================================================
5
%>
6
<%
7
' Release Change Mode
8
Const enumRELEASE_CHANGE_MODE_PKG_ADDED = 1 'Package added to release
9
Const enumRELEASE_CHANGE_MODE_PKG_REMOVED = 2 'Package removed from release
10
Const enumRELEASE_CHANGE_MODE_PKG_RELEASED = 3 'Package released
11
 
12
 
13
Class ReleaseChanged
14
 
15
private m_pkg_name
16
private m_pkg_version
17
private m_pkg_id
18
private m_proj_id
19
 
20
 
21
'-----------------------------------------------------------------------------------------------------------------
22
' Retrieves package infomation for the specified package version
23
' This information is required for the make_release_changed script
24
Public Sub Get_Package_Info (artag_id,apv_id)
25
   Dim ssql, rsTemp, stable
26
   Dim iEnvTab
27
 
28
   ' Get package information   
29
   ssql = _
30
   " SELECT pv.pkg_id,pk.pkg_name,pv.pkg_version,rt.proj_id"&_
31
   " FROM package_versions pv, packages pk, release_tags rt"&_
32
   " WHERE" &_
33
   "     pv.pv_id = " & apv_id &_
34
   " AND pv.pkg_id = pk.pkg_id" &_
35
   " AND rt.rtag_id = " & artag_id
36
 
37
   Set rsTemp = OraDatabase.CreateDynaset( ssql, cint(0))
38
 
39
   If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
40
      m_pkg_name = rsTemp("pkg_name")
41
      m_pkg_version = rsTemp("pkg_version")
42
      m_pkg_id = rsTemp("pkg_id")
43
      m_proj_id = rsTemp("proj_id")
44
   Else
45
      Err.Raise 8, "Error getting package information.  PV_ID, " & APV_ID & " not found in."
46
      Call RaiseMsg ( enum_MSG_ERROR, Err.description )
47
   End If
48
   rsTemp.Close
49
   Set rsTemp = Nothing
50
End Sub
51
 
52
'-----------------------------------------------------------------------------------------------------------------
53
' Run script job, ReleaseChanged, of script, on_Make_Official.wsf for the specified list of package versions.
54
' apv_id_list is a comma separated list of pv_id's
55
Sub Run_ReleaseChanged_List(artag_id,apv_id_list,amode_id)
56
  Dim pv_id, idArr
57
 
58
  idArr = Split(apv_id_list,",")
59
  For Each pv_id in idArr
60
    Call Run_ReleaseChanged(artag_id,pv_id,amode_id,true)
61
  Next
62
End Sub
63
 
64
'-----------------------------------------------------------------------------------------------------------------
65
' Run script job, ReleaseChanged, of script, on_Make_Official.wsf for the specified package version.
66
' This job calls the unix script, make_release_changed
67
Sub Run_ReleaseChanged(artag_id,apv_id,amode_id,aget_info)
68
  Dim sysShell: Set sysShell = Server.CreateObject("WScript.Shell")
69
 
70
  if aget_info then
71
    Call Get_Package_Info (artag_id,apv_id)
72
  end if
73
 
74
  Call sysSHell.Run("cmd.exe /c cscript.exe //B //NoLogo " & rootPath & SCRIPTS_FOLDER &"\on_Make_Official.wsf //job:ReleaseChanged" & " /pkg_name:""" & m_pkg_name & """" & " /pkg_version:""" & m_pkg_version & """" & " /rtag_id:" & artag_id & " /pkg_id:" & m_pkg_id & " /pv_id:" & apv_id & " /proj_id:" & m_proj_id & " /mode_id:" & amode_id, 0, False)
75
  Set sysShell = Nothing
76
End Sub
77
 
78
End Class
79
%>