Skip to content

Commit

Permalink
Merge pull request #307 from pjk25/fix-app_src-default
Browse files Browse the repository at this point in the history
Only apply the default for app_src of erlang_app_sources if unset
  • Loading branch information
michaelklishin committed Aug 13, 2024
2 parents 7782917 + 6cf35ec commit 4a234ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 4 additions & 4 deletions erlang_app_sources.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ def erlang_app_sources(
priv = None,
license_files = None,
**kwargs):

app_src_paths = native.glob(["src/%s.app.src" % app_name])
if len(app_src_paths) == 1:
app_src = app_src_paths[0]
if app_src == None:
app_src_paths = native.glob(["src/%s.app.src" % app_name])
if len(app_src_paths) == 1:
app_src = app_src_paths[0]

if public_hdrs == None:
public_hdrs = native.glob([
Expand Down
2 changes: 0 additions & 2 deletions examples/basic/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,13 @@ erlc_opts_file(
erlang_app_sources(
name = "%s_srcs" % APP_NAME,
app_name = APP_NAME,
app_src = ":app_src",
erlc_opts_file = ":erlc_opts_file",
visibility = ["//visibility:public"],
)

erlang_app_sources(
name = "test_%s_srcs" % APP_NAME,
app_name = APP_NAME,
app_src = ":app_src",
erlc_opts_file = ":test_erlc_opts_file",
visibility = ["//visibility:public"],
)
Expand Down

0 comments on commit 4a234ef

Please sign in to comment.