Skip to content

Commit

Permalink
script to update schema when we make schema changes
Browse files Browse the repository at this point in the history
  • Loading branch information
daanelson committed Oct 2, 2024
1 parent 9aa01aa commit 9f36e63
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions script/update-schema.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

MODEL_NAME="$1"

./script/select.sh "$MODEL_NAME"

if [ $? -ne 0 ]; then
echo "Couldn't select a model, double check you're passing a valid name."
exit 1
fi

v=$(cog --version)

# async cog?
if [[ $v == *"0.9."* ]]; then
echo "Sync cog found, pushing model"
else
echo "Nope! switch to sync cog and rebuild"
exit -1
fi

# Conditional cog push based on environment
echo "Pushing image to prod to update schema"
date +%s > the_time.txt
cog push r8.im/black-forest-labs/flux-$MODEL_NAME

0 comments on commit 9f36e63

Please sign in to comment.