Subversion Repositories DevTools

Rev

Rev 149 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 149 Rev 151
Line 233... Line 233...
233
End Function
233
End Function
234
 
234
 
235
'--------------------------------------------------------------------------------------------
235
'--------------------------------------------------------------------------------------------
236
' Daemon Instruction validation function
236
' Daemon Instruction validation function
237
'--------------------------------------------------------------------------------------------
237
'--------------------------------------------------------------------------------------------
238
Function HandleValidateDaemonInstructionError(retERRmsg)
238
Function HandleValidateDaemonInstructionError(nOpCode, retERRmsg)
239
   Dim s
239
   Dim s
240
 
240
 
241
   s = ""
241
   s = ""
242
 
242
 
243
   HandleValidateDaemonInstructionError = True
243
   HandleValidateDaemonInstructionError = True
244
 
244
 
245
   If NOT IsNull(retERRmsg) Then
245
   If NOT IsNull(retERRmsg) Then
-
 
246
      ' Exclusions -
-
 
247
      ' 1) Ignore "unit tests not supplied" error for ripple build package daemon instruction
-
 
248
      If NOT ((nOpCode = OP_CODE_0_RIPPLE_BUILD_PACKAGE) AND (retERRmsg = "enum_MSG_UNIT_TESTS_NOT_SUPPLIED"))  Then
-
 
249
 
246
      ' Re-interpret the error message that has been returned from the queries. We do this because normally,
250
         ' Re-interpret the error message that has been returned from the queries. We do this because normally,
247
      ' these errors are associated with individual message files but the messsages in those files are slightly
251
         ' these errors are associated with individual message files but the messsages in those files are slightly
248
      ' inappropriate for the context of adding a daemon instruction so we will provide our own message display
252
         ' inappropriate for the context of adding a daemon instruction so we will provide our own message display
249
      ' using the generic enum_WMSG_ERROR file with a bespoke error string.
253
         ' using the generic enum_WMSG_ERROR file with a bespoke error string.
250
      Select Case retERRmsg
254
         Select Case retERRmsg
251
      Case "enum_MSG_MISSING_DEPENDENCIES"
255
         Case "enum_MSG_MISSING_DEPENDENCIES"
252
         s = "Some dependencies of this package are missing from a release."
256
            s = "Some dependencies of this package are missing from a release."
253
      Case "enum_MSG_PACKAGE_INFORMATION_INCOMPLETE"
257
         Case "enum_MSG_PACKAGE_INFORMATION_INCOMPLETE"
254
         s = "Package information section on Release Notes tab is not fully complete."
258
            s = "Package information section on Release Notes tab is not fully complete."
255
      Case "enum_MSG_AUTOBUILD_PACKAGE_REQUIRES_BUILD_STD_AND_ENV"
259
         Case "enum_MSG_AUTOBUILD_PACKAGE_REQUIRES_BUILD_STD_AND_ENV"
256
         s = "Package must have a build standard and build environment."
260
            s = "Package must have a build standard and build environment."
257
      Case "enum_MSG_REASON_FOR_THIS_VERSION_NOT_SUPLIED"
261
         Case "enum_MSG_REASON_FOR_THIS_VERSION_NOT_SUPLIED"
258
         s = "A reason for this version must be supplied."
262
            s = "A reason for this version must be supplied."
259
      Case "enum_MSG_UNIT_TESTS_NOT_SUPPLIED"
263
         Case "enum_MSG_UNIT_TESTS_NOT_SUPPLIED"
260
         s = "There are no unit tests supplied for this package."
264
            s = "There are no unit tests supplied for this package."
261
      Case "enum_MSG_PACKAGE_CHANGETYPE_INCOMPLETE"
265
         Case "enum_MSG_PACKAGE_CHANGETYPE_INCOMPLETE"
262
         s = "Package change type in Release Notes Tab is not defined."
266
            s = "Package change type in Release Notes Tab is not defined."
263
      Case "enum_MSG_BROKEN_DEPENDENCIES_FOUND"
267
         Case "enum_MSG_BROKEN_DEPENDENCIES_FOUND"
264
         s = "Some of the packages dependencies are broken. Fix them first before trying to add a daemon instruction to this package."
268
            s = "Some of the packages dependencies are broken. Fix them first before trying to add a daemon instruction to this package."
265
      Case "enum_MSG_UNOFFICIAL_DEPENDENCIES_FOUND"
269
         Case "enum_MSG_UNOFFICIAL_DEPENDENCIES_FOUND"
266
         s = "Some dependencies of this package are still not released. Release them first before trying to add a daemon instruction to this package."
270
            s = "Some dependencies of this package are still not released. Release them first before trying to add a daemon instruction to this package."
267
      Case Else
271
         Case Else
268
         s = "Correct any errors in the release notes, and try again."
272
            s = "Correct any errors in the release notes, and try again."
269
      End Select
273
         End Select
-
 
274
 
-
 
275
         ' redirect to an error
-
 
276
         CloseWindow
-
 
277
         Call RaiseMsgInParent ( enum_WMSG_ERROR, "Cannot add this daemon instruction<br><br>" & s)
270
 
278
 
271
      ' redirect to an error
279
         HandleValidateDaemonInstructionError = False
272
      CloseWindow
280
      End If
273
      Call RaiseMsgInParent ( enum_WMSG_ERROR, "Cannot add this daemon instruction<br><br>" & s)
-
 
274
 
-
 
275
      HandleValidateDaemonInstructionError = False
-
 
276
   End If
281
   End If
277
 
282
 
278
End Function
283
End Function
279
 
284
 
280
Function ValidateDaemonInstruction(nOpCode, nRtag_id, nPv_id)
285
Function ValidateDaemonInstruction(nOpCode, nRtag_id, nPv_id)
Line 299... Line 304...
299
      Call CheckRequirementsForMakePending ( nPv_id, nRtag_id, pkgType, retERRmsg, retALRTmsg, retParameters )
304
      Call CheckRequirementsForMakePending ( nPv_id, nRtag_id, pkgType, retERRmsg, retALRTmsg, retParameters )
300
      If IsNull(retERRmsg) Then
305
      If IsNull(retERRmsg) Then
301
         ' Check broken dependencies, missing dependencies, unofficial dependencies, bad package info, reason for version, unit test
306
         ' Check broken dependencies, missing dependencies, unofficial dependencies, bad package info, reason for version, unit test
302
         Call CheckRequirementsForMakeRelease( nPv_id, nRtag_id, pkgType, retERRmsg, retALRTmsg, retParameters )
307
         Call CheckRequirementsForMakeRelease( nPv_id, nRtag_id, pkgType, retERRmsg, retALRTmsg, retParameters )
303
      End If
308
      End If
304
      ValidateDaemonInstruction = HandleValidateDaemonInstructionError(retERRmsg)
309
      ValidateDaemonInstruction = HandleValidateDaemonInstructionError(nOpCode,retERRmsg)
305
 
310
 
306
   Case OP_CODE_1_TEST_BUILD_PACKAGE
311
   Case OP_CODE_1_TEST_BUILD_PACKAGE
307
      ' check missing dependencies, bad package info, missing build std/env, reason for version, unit test
-
 
308
      Call CheckRequirementsForMakePending ( nPv_id, nRtag_id, pkgType, retERRmsg, retALRTmsg, retParameters )
-
 
309
      If IsNull(retERRmsg) Then
-
 
310
         ' check change type
-
 
311
         Call CheckRequirementsForMakeApproved( nPv_id, nRtag_id, pkgType, retERRmsg, retALRTmsg, retParameters )
-
 
312
         If IsNull(retERRmsg) Then
-
 
313
            ' Check broken dependencies, missing dependencies, unofficial dependencies, bad package info, reason for version, unit test
-
 
314
            Call CheckRequirementsForMakeRelease( nPv_id, nRtag_id, pkgType, retERRmsg, retALRTmsg, retParameters )
-
 
315
         End If
-
 
316
      End If
-
 
317
      ValidateDaemonInstruction = HandleValidateDaemonInstructionError(retERRmsg)
312
      ValidateDaemonInstruction = True ' no validation checks for this instruction
318
 
313
 
319
   Case Else
314
   Case Else
320
      CloseWindow
315
      CloseWindow
321
      Call RaiseMsgInParent(enum_MSG_ERROR, "Attempt to add an unknown daemon instruction")
316
      Call RaiseMsgInParent(enum_MSG_ERROR, "Attempt to add an unknown daemon instruction")
322
      ValidateDaemonInstruction = False
317
      ValidateDaemonInstruction = False
323
   End Select
318
   End Select
324
End Function
319
End Function
325
 
-
 
326
 
-
 
327
'------------------------------------------------------------------------------------------------------------------------------------------
320
'------------------------------------------------------------------------------------------------------------------------------------------
328
 
321
 
329
 
322
 
330
 
323
 
331
%>
324
%>