Skip to content

Commit

Permalink
chore(benchmarks): remove unnecessary output files (#3374)
Browse files Browse the repository at this point in the history
  • Loading branch information
tltsutltsu authored Sep 28, 2023
1 parent de7ef50 commit f9509f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
chore(runtime): update weights
file_pattern: "pallets/gear/src/ runtime/gear/src/weights/ runtime/vara/src/weights/"

- name: Create pull Request
- name: Create Pull Request
if: ${{ inputs.change-type == 'pull_request' }}
uses: peter-evans/create-pull-request@v5
with:
Expand Down
6 changes: 6 additions & 0 deletions scripts/benchmarking/merge_outputs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ while IFS= read -r line; do
echo "$def_line"
done
elif [[ "$line" =~ ^impl.*WeightInfo\ for.*\{$ ]]; then
# Insert a tab (4 spaces) for the first line
echo -n ' '
# Insert the weights array here
for weight in "${weights[@]}"; do
echo "$weight"
Expand All @@ -45,4 +47,8 @@ done < "$MAIN_FILE" > "$MAIN_FILE.tmp"
# Rename the temporary file to the original file
mv "$MAIN_FILE.tmp" "$MAIN_FILE"

for FILE in "${ADDITIONAL_FILES[@]}"; do
rm "$FILE"
done

echo "[+] Merged pallet_gear functions into $MAIN_FILE"

0 comments on commit f9509f6

Please sign in to comment.