Skip to content

Commit 2896bd1

Browse files
committed
pr fix: declare debug mode as input
1 parent f0c5174 commit 2896bd1

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ type Configs struct {
2828
Module string `env:"module"`
2929
Arguments string `env:"arguments"`
3030
CacheLevel string `env:"cache_level,opt[none,only_deps,all]"`
31+
IsDebug bool `env:"is_debug,opt[true,false]"`
3132
}
3233

3334
func failf(f string, args ...interface{}) {
@@ -112,7 +113,7 @@ func filterVariants(module, variant string, variantsMap gradle.Variants) (gradle
112113
func main() {
113114
var config Configs
114115

115-
if debug := os.Getenv("is_debug"); debug == "yes" {
116+
if config.IsDebug {
116117
log.SetEnableDebugLog(true)
117118
log.Debugf("Debug mode enabled")
118119
}

step.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,13 @@ inputs:
8080
- "all"
8181
- "only_deps"
8282
- "none"
83+
- is_debug: "false"
84+
opts:
85+
category: Debug
86+
title: "Enable Debug Mode"
87+
summary: The step will print more verbose logs if enabled.
88+
description: The step will print more verbose logs if enabled.
89+
is_required: true
90+
value_options:
91+
- "false"
92+
- "true"

0 commit comments

Comments
 (0)