Package br.com.objectos.rio.iro

Source Code of br.com.objectos.rio.iro.IroEtoMirrorOptions

/*
* Copyright 2014 Objectos, Fábrica de Software LTDA.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package br.com.objectos.rio.iro;

import static br.com.objectos.rio.RioVersion.VERSION;

import java.io.File;

import br.com.objectos.way.base.io.Directory;

import com.beust.jcommander.Parameter;
import com.beust.jcommander.Parameters;

/**
* @author marcio.endo@objectos.com.br (Marcio Endo)
*/
@Parameters
class IroEtoMirrorOptions {

  String version = VERSION.get();

  @Parameter(names = { "--stage3", "-3" })
  public boolean stage3 = false;

  @Parameter(names = { "--stage3-upload", "-3u" })
  public boolean stage3Upload = false;

  @Parameter(names = "--server")
  String server = "rio.objectos.com.br";

  public String remotePath() {
    return String.format("/var/www/localhost/htdocs/iro/%s/%s", getCode(), version);
  }

  public File stage3File(IroDirs dirs) {
    Directory var = var(dirs);
    String name = String.format("iro-%s-%s.tar.gz", getCode(), version);
    return var.fileAt(name);
  }

  String getCode() {
    return "eto";
  }

  Directory var(IroDirs dirs) {
    return dirs.etoVar();
  }

  Directory mountDir(IroDirs dirs) {
    return dirs.etoMountDir();
  }

}
TOP

Related Classes of br.com.objectos.rio.iro.IroEtoMirrorOptions

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.