Skip to content

Commit

Permalink
accept full metadata path for android
Browse files Browse the repository at this point in the history
resolves #2
  • Loading branch information
ashutoshgngwr committed May 8, 2022
1 parent e9975c2 commit b706a50
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- uses: actions/checkout@v1
- uses: ashutoshgngwr/validate-fastlane-supply-metadata@v1
with:
fastlaneDir: ./fastlane # optional. default is './fastlane'.
fastlaneDir: ./android-metadata # optional. default is './fastlane/metadata/android'.
# enable check to validate if a locale is supported by the Play Store Listing.
usePlayStoreLocales: true # optional. default is false.
```
Expand Down
4 changes: 2 additions & 2 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ description: >-
the Play Store listing constraints.
inputs:
fastlaneDir:
description: Path of the Fastlane directory
description: Path of the Fastlane Android directory
required: false
default: ./fastlane
default: ./fastlane/metadata/android
usePlayStoreLocales:
description: Throw error if a locale isn't recognised by Google Play Store
required: false
Expand Down
7 changes: 3 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,10 @@ func init() {
}

func main() {
metadataPath := filepath.Join(fastlanePath, "metadata", "android")
files, err := ioutil.ReadDir(metadataPath)
files, err := ioutil.ReadDir(fastlanePath)
if err != nil {
const errFmt = "failed to read directory %q: %s\n"
fmt.Fprintf(os.Stderr, errFmt, metadataPath, err)
fmt.Fprintf(os.Stderr, errFmt, fastlanePath, err)
os.Exit(1)
}

Expand All @@ -71,7 +70,7 @@ func main() {
continue
}

localePath := filepath.Join(metadataPath, f.Name())
localePath := filepath.Join(fastlanePath, f.Name())
if usePlayStoreLocales && !playStoreLocales.contains(f.Name()) {
const errFmt = "play store doesn't recognise %q locale: closest alternative is %q"
errs = append(errs, &validationError{
Expand Down

0 comments on commit b706a50

Please sign in to comment.