private function readPreviousVersionNumber()
  {
    if ($this->myFilename)
    {
      if (is_file($this->myFilename))
      {
        $content = file_get_contents($this->myFilename);
        if ($content===false)
        {
          $this->logError("Not readable file %s.", $this->myFilename);
        }

        if ($content)
        {
          $this->myPreviousVersion = $this->validateSemanticVersion($content);
          if ($this->myPreviousVersion)
          {
            $this->logInfo("Current version is %s", $this->myPreviousVersion['version']);
          }
          else
          {
            $this->logError("Version is %s is not a valid Semantic Version", $this->myPreviousVersion['version']);
          }
        }
      }
      else
      {
        $this->logInfo("File %s does not exist", $this->myFilename);
      }
    }
  }
private function readPreviousVersionNumber()
  {
    if ($this->myFilename)
    {
      if (is_file($this->myFilename))
      {
        $content = file_get_contents($this->myFilename);
        if ($content===false)
        {
          $this->logError("Not readable file %s.", $this->myFilename);
        }

        if ($content)
        {
          $this->myPreviousVersion = $this->validateSemanticVersion($content);
          if ($this->myPreviousVersion)
          {
            $this->logInfo("Current version is %s", $this->myPreviousVersion['version']);
          }
          else
          {
            $this->logError("Version is %s is not a valid Semantic Version", $this->myPreviousVersion['version']);
          }
        }
      }
      else
      {
        $this->logInfo("File %s does not exist", $this->myFilename);
      }
    }
  }
private function readPreviousVersionNumber ( ) { if ( $ this -> myFilename ) { if ( is_file ( $ this -> myFilename ) ) { $ content = file_get_contents ( $ this -> myFilename ) ; if ( $ content === false ) { $ this -> logError ( "Not readable file %s." , $ this -> myFilename ) ; } if ( $ content ) { $ this -> myPreviousVersion = $ this -> validateSemanticVersion ( $ content ) ; if ( $ this -> myPreviousVersion ) { $ this -> logInfo ( "Current version is %s" , $ this -> myPreviousVersion [ 'version' ] ) ; } else { $ this -> logError ( "Version is %s is not a valid Semantic Version" , $ this -> myPreviousVersion [ 'version' ] ) ; } } } else { $ this -> logInfo ( "File %s does not exist" , $ this -> myFilename ) ; } } }
Reads previous version from file if filename is set.
Reads previous version from file if filename is set .