protected function getPropertiesFile()
    {
        $propertyfile = getcwd().'/build.properties';

        if (true === $this->input->hasParameterOption('--propertyfile')) {
            $propertyfile = realpath($this->input->getParameterOption('--propertyfile'));
        }

        if (is_file($propertyfile) && is_readable($propertyfile)) {
            return $propertyfile;
        }

        if (true === $this->input->hasParameterOption('--propertyfile')) {
            throw new \Exception(
                sprintf(
                    'Could not find properties file "%s"',
                    $this->input->getParameterOption('--propertyfile')
                )
            );
        }

        return false;
    }