Sort lines

This commit is contained in:
Don 2019-09-09 17:03:34 -07:00
parent 703857da2f
commit 799bb0f53a
2 changed files with 21 additions and 21 deletions

View File

@ -35,26 +35,26 @@ const (
BuildActionEnvVar = "DRONE_BUILD_ACTION"
// BuildCreatedEnvVar corresponds to Build.Created.
BuildCreatedEnvVar = "DRONE_BUILD_CREATED"
// BuildDeployToEnvVar corresponds to Build.DeployTo.
BuildDeployToEnvVar = "DRONE_DEPLOY_TO"
// BuildEventEnvVar corresponds to Build.Event.
BuildEventEnvVar = "DRONE_BUILD_EVENT"
// BuildFailedStagesEnvVar corresponds to Build.FailedStages.
BuildFailedStagesEnvVar = "DRONE_FAILED_STAGES"
// BuildFailedStepsEnvVar corresponds to Build.FailedSteps.
BuildFailedStepsEnvVar = "DRONE_FAILED_STEPS"
// BuildFinishedEnvVar corresponds to Build.Finished.
BuildFinishedEnvVar = "DRONE_BUILD_FINISHED"
// BuildNumberEnvVar corresponds to Build.Created.
BuildNumberEnvVar = "DRONE_BUILD_NUMBER"
// BuildParentEnvVar corresponds to Build.Parent.
BuildParentEnvVar = "DRONE_BUILD_PARENT"
// BuildPullRequestEnvVar corresponds to Build.PullRequest.
BuildPullRequestEnvVar = "DRONE_PULL_REQUEST"
// BuildStartedEnvVar corresponds to Build.Started.
BuildStartedEnvVar = "DRONE_BUILD_STARTED"
// BuildStatusEnvVar corresponds to Build.Status.
BuildStatusEnvVar = "DRONE_BUILD_STATUS"
// BuildDeployToEnvVar corresponds to Build.DeployTo.
BuildDeployToEnvVar = "DRONE_DEPLOY_TO"
// BuildFailedStagesEnvVar corresponds to Build.FailedStages.
BuildFailedStagesEnvVar = "DRONE_FAILED_STAGES"
// BuildFailedStepsEnvVar corresponds to Build.FailedSteps.
BuildFailedStepsEnvVar = "DRONE_FAILED_STEPS"
// BuildPullRequestEnvVar corresponds to Build.PullRequest.
BuildPullRequestEnvVar = "DRONE_PULL_REQUEST"
// BuildSourceBranchEnvVar corresponds to Build.SourceBranch.
BuildSourceBranchEnvVar = "DRONE_SOURCE_BRANCH"
// BuildTagEnvVar corresponds to Build.Tag.

View File

@ -34,26 +34,26 @@ type (
Action string
// Created time of the build.
Created time.Time
// DeployTo the environment.
DeployTo string
// Event that triggered the build.
Event string
// FailedStages of the build.
FailedStages []string
// FailedSteps of the build.
FailedSteps []string
// Finished time of the build.
Finished time.Time
// Number for the build.
Number int
// Parent build number for the build.
Parent int
// PullRequest number of the build.
PullRequest int
// Started time of the build.
Started time.Time
// Status of the build.
Status string
// DeployTo the environment.
DeployTo string
// FailedStages of the build.
FailedStages []string
// FailedSteps of the build.
FailedSteps []string
// PullRequest number of the build.
PullRequest int
// SourceBranch for the pull request.
SourceBranch string
// Tag of the build.
@ -194,17 +194,17 @@ func BuildFromEnv() Build {
return Build{
Action: StringEnvVar(BuildActionEnvVar),
Created: TimeEnvVar(BuildCreatedEnvVar),
DeployTo: StringEnvVar(BuildDeployToEnvVar),
Event: StringEnvVar(BuildEventEnvVar),
FailedStages: StringSliceEnvVar(BuildFailedStagesEnvVar),
FailedSteps: StringSliceEnvVar(BuildFailedStepsEnvVar),
Finished: TimeEnvVar(BuildFinishedEnvVar),
Number: IntEnvVar(BuildNumberEnvVar),
Parent: IntEnvVar(BuildParentEnvVar),
Started: TimeEnvVar(BuildStartedEnvVar),
Status: StringEnvVar(BuildStatusEnvVar),
DeployTo: StringEnvVar(BuildDeployToEnvVar),
FailedStages: StringSliceEnvVar(BuildFailedStagesEnvVar),
FailedSteps: StringSliceEnvVar(BuildFailedStepsEnvVar),
PullRequest: IntEnvVar(BuildPullRequestEnvVar),
SourceBranch: StringEnvVar(BuildSourceBranchEnvVar),
Started: TimeEnvVar(BuildStartedEnvVar),
Status: StringEnvVar(BuildStatusEnvVar),
Tag: StringEnvVar(BuildTagEnvVar),
TargetBranch: StringEnvVar(BuildTargetBranchEnvVar),
}