Skip to content

Commit 88e7e13

Browse files
authored
Update generator to use configlet create (#347)
1 parent f4d080f commit 88e7e13

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

bin/generate_practice_exercise

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,7 @@ echo "Fetching latest version of configlet..."
3535

3636
# Preparing config.json
3737
echo "Adding instructions and configuration files..."
38-
UUID=$(bin/configlet uuid)
39-
jq --arg slug "$SLUG" --arg uuid "$UUID" \
40-
'.exercises.practice += [{slug: $slug, name: "TODO", uuid: $uuid, practices: [], prerequisites: [], difficulty: 5}]' \
41-
config.json > config.json.tmp
42-
# jq always rounds whole numbers, but average_run_time needs to be a float
43-
sed -i 's/"average_run_time": \([[:digit:]]\+\)$/"average_run_time": 2.0/' config.json.tmp
44-
mv config.json.tmp config.json
45-
46-
# Create instructions and config files
47-
./bin/configlet sync --update --yes --docs --filepaths --metadata --exercise "$SLUG"
38+
./bin/configlet create --practice-exercise "$SLUG"
4839

4940
pushd tools
5041
emacs -batch -l install-packages.el -l practice-exercise-generator.el --eval "(exercism/generate-practice-exercise \"$SLUG\")"

0 commit comments

Comments
 (0)