func (b *BashWriter) Variable(variable common.BuildVariable) { if variable.File { variableFile := b.Absolute(path.Join(b.TemporaryPath, variable.Key)) b.Line(fmt.Sprintf("mkdir -p %q", helpers.ToSlash(b.TemporaryPath))) b.Line(fmt.Sprintf("echo -n %s > %q", helpers.ShellEscape(variable.Value), variableFile)) b.Line(fmt.Sprintf("export %s=%q", helpers.ShellEscape(variable.Key), variableFile)) } else { b.Line(fmt.Sprintf("export %s=%s", helpers.ShellEscape(variable.Key), helpers.ShellEscape(variable.Value))) } }
func (b *Build) FullProjectDir() string { return helpers.ToSlash(b.BuildDir) }