Created
April 26, 2019 13:15
-
-
Save fhunleth/e3da16a9685a897d23b33f4c17378c77 to your computer and use it in GitHub Desktop.
fwup metadata to slack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./jq-linux64 -n \ | |
--arg meta_uuid $(grep 'meta-uuid' <<< $FW_META | awk -F"=" '{ print $2}') \ | |
--arg meta_version "$(grep 'meta-version' <<< $FW_META | awk -F"=" '{ print $2}')" \ | |
--arg meta_vcs_identifier "$(grep 'meta-vcs-identifier' <<< $FW_META | awk -F"=" '{ print $2}')" \ | |
--arg meta_platform "$(grep 'meta-platform' <<< $FW_META | awk -F"=" '{ print $2}')" \ | |
--arg meta_creation_date "$(grep 'meta-creation-date' <<< $FW_META | awk -F"=" '{ print $2}')" \ | |
--arg meta_misc "$(grep 'meta-misc' <<< $FW_META | awk -F"=" '{ print $2}')" \ | |
'{channel: "C41SHHGQ5", as_user: true, blocks: [ | |
{type: "section", block_id: "text1", text: {type: "mrkdwn", text: "*A new FarmBot Firmware is available*"}}, | |
{type: "context", elements: [ | |
{type: "mrkdwn", text: "*UUID:*"}, | |
{type: "mrkdwn", text: $meta_uuid} | |
]}, | |
{type: "context", elements: [ | |
{type: "mrkdwn", text: "*Version:*"}, | |
{type: "mrkdwn", text: $meta_version} | |
]}, | |
{type: "context", elements: [ | |
{type: "mrkdwn", text: "*Git ID:*"}, | |
{type: "mrkdwn", text: $meta_vcs_identifier} | |
]}, | |
{type: "context", elements: [ | |
{type: "mrkdwn", text: "*Misc:*"}, | |
{type: "mrkdwn", text: $meta_misc} | |
]}, | |
{type: "context", elements: [ | |
{type: "mrkdwn", text: "*Platform:*"}, | |
{type: "mrkdwn", text: $meta_platform} | |
]}, | |
{type: "context", elements: [ | |
{type: "mrkdwn", text: "*Creation Date:*"}, | |
{type: "mrkdwn", text: $meta_creation_date} | |
]} | |
]}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is from Connor Rigby.