def execCommand(args, following_args): p = validate.currentDirectoryModuleOrTarget() if not p: return 1 if not p.vcsIsClean(): logging.error('The working directory is not clean. Commit before publishing!') return 1 errcode = prePublishCheck(p, args.force, args.interactive) if errcode and not args.force: return errcode errcode = p.runScript('prePublish') if errcode: logging.error("prePublish script error code %s prevents publishing", errcode) return errcode error = p.publish(args.registry) if error: logging.error(error) return 1 errcode = p.runScript('postPublish') if errcode: logging.warning("postPublish script exited with code %s", errcode) # tag the version published as 'latest' # !!! can't do this, as can't move tags in git? #p.commitVCS(tag='latest') logging.info('published latest version: %s', p.getVersion()) return errcode
def execCommand(args, following_args): p = validate.currentDirectoryModuleOrTarget() if not p: return 1 if not p.vcsIsClean(): logging.error( 'The working directory is not clean. Commit before publishing!') return 1 errcode = prePublishCheck(p, args.force, args.interactive) if errcode and not args.force: return errcode errcode = p.runScript('prePublish') if errcode: logging.error("prePublish script error code %s prevents publishing", errcode) return errcode error = p.publish(args.registry) if error: logging.error(error) return 1 errcode = p.runScript('postPublish') if errcode: logging.warning("postPublish script exited with code %s", errcode) # tag the version published as 'latest' # !!! can't do this, as can't move tags in git? #p.commitVCS(tag='latest') logging.info('published latest version: %s', p.getVersion()) return errcode
def execCommand(args, following_args): p = validate.currentDirectoryModuleOrTarget() if not p: return 1 error = p.unpublish(args.registry) if error: logging.error(error) return 1 logging.info('unpublished version: %s', p.getVersion()) return 0