Skip to content

Commit db66fa3

Browse files
committed
Update l10n-gen script to handle non-existing target folders
1 parent 947f855 commit db66fa3

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

RELEASE_NOTES.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,17 @@ Beta version tags and releases are removed after the next minor or major version
1313

1414
## 2.0.1
1515

16-
This version makes `StringCatalogKeyBuilder` tool independent of `SwiftPackageScripts`. This solves a bug where the script would crash in other packages, due to a missing path.
16+
This version makes `StringCatalogKeyBuilder` tool independent of `SwiftPackageScripts`. This solves a bug where it would crash in other package folders.
17+
18+
This version also fixes a bug where trying to use the CLI to write to a non-existing folder would not work, by upgrading both the `l10n-gen` script and the CLI tool.
19+
20+
## 💡 Changes
21+
22+
* The `StringCatalogKeyBuilder` CLI tool now builds on all platforms.
1723

1824
## 🐛 Bug Fixes
1925

26+
* `scripts/l10n-gen` no longer fails if the target folder doesn't exist.
2027
* `tools/StringCatalogKeyBuilder` no longer needs the main package to function.
2128
* `tools/StringCatalogKeyBuilder` no longer fails if the target folder doesn't exist.
2229

scripts/l10n-gen.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ get_absolute_path() {
5151
echo "$path"
5252
else
5353
# Make it absolute relative to current directory
54-
echo "$(cd "$(dirname "$path")" 2>/dev/null && pwd)/$(basename "$path")"
54+
echo "$(pwd)/$path"
5555
fi
5656
}
5757

@@ -181,4 +181,4 @@ echo "Running: swift run l10n-gen $ARGS"
181181

182182
# Complete successfully
183183
echo "Code generation completed successfully!"
184-
echo
184+
echo

0 commit comments

Comments
 (0)