Skip to content

Commit

Permalink
Add template for other platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
readefries committed Mar 25, 2024
1 parent bf5a817 commit 45bbc5f
Showing 1 changed file with 72 additions and 0 deletions.
72 changes: 72 additions & 0 deletions deploy/automation/platform/platform_functions.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#!/usr/bin/env bash

# If you copy this file, make sure it has executable permissions e.g.
# Linux/Mac: `chmod +x new_platform_functions.sh`
# Windows: `git --update-index --chmod=+x new_platform_functions.sh`

function setup_dependencies() {
# If you need to set platform specific dependencies, you can do it here.
# This function shouldn't echo anything, as the results are interpreted by the to export variables that are needed later during runs.

# Example:
# echo "VARIABLE_NAME=value"
}

function exit_error() {
MESSAGE="$(caller | awk '{print $2":"$1} ') $1"
ERROR_CODE=$2

echo -e "[ERROR] $boldred--- ${MESSAGE} ---${resetformatting}"

exit $ERROR_CODE
}

function log_warning() {
MESSAGE=$1

echo "[WARNING] ${MESSAGE}"
}

function start_group() {
MESSAGE=$1

echo "[START-GROUP] ${MESSAGE}"
}

function end_group() {
echo "[END-GROUP]"
}

function commit_changes() {
message=$1
is_custom_message=${2:-false}

if [[ $is_custom_message == "true" ]]; then
git commit -m "${message}"
else
# TODO: If you want to use this function, you need to implement it, so run specific information is added to the commit
fi

git push
}

function __get_value_with_key() {
key=$1

# TODO: If you want to use this function, you need to implement it
value=$()

echo $value
}

function __set_value_with_key() {
key=$1
new_value=$2

# TODO: If you want to use this function, you need to implement it
}

function upload_summary() {
summary=$1
# TODO: If you want to use this function, you need to implement it
}

0 comments on commit 45bbc5f

Please sign in to comment.