Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing deploy script + deleting script/README #7016

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions scripts/README.md

This file was deleted.

11 changes: 10 additions & 1 deletion scripts/deploy_text.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/bash
#
# This script generates the body text for deployment PRs in the Braze Docs repository.
#
# Usage: ~/braze-docs/scripts/deploy_text.sh

TEMP_FILE=$(mktemp)

Expand All @@ -20,5 +24,10 @@ echo "$COMMIT_LOGS" | while IFS=»¦« read -r title body; do
done

# Returns the results in reverse order and clean up files.
tac "$TEMP_FILE"
if command -v tac &> /dev/null
then
tac "$TEMP_FILE" # 'tac' is used by default
else
tail -r "$TEMP_FILE" # 'tail -r' is used if tac isn't available
fi
rm "$TEMP_FILE"
9 changes: 9 additions & 0 deletions scripts/unused_link_cleaner.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# This script deletes unused shortlinks from the bottom of a file, such as:
# [1]: {{site.baseurl}}/contributing/your_first_contribution/
#
# Usage: ruby unused_link_cleaner.rb [option]
#
# Options:
# PATH/TO/FILE Delete unused shortlinks in a single file.
# PATH/TO/DIRECTORY Recursively delete unused shortlinks in a directory.

require 'fileutils'
require "readline"

Expand Down