Skip to content

Commit

Permalink
Make the snap build use the latest binary
Browse files Browse the repository at this point in the history
  • Loading branch information
xordspar0 committed Oct 4, 2017
1 parent 681c416 commit 5de24a2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions bot/bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func (b *BotServer) botListener(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusBadRequest)
}

// TODO: Make this more safe when there are missing fields.
if message, ok := jsonBody["message"].(map[string]interface{}); ok {
messageText := message["text"].(string)
if url := xurls.Strict.FindString(messageText); url != "" {
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions packages/build_snap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ else
sed -i "s/{{grade}}/stable/" snap/snapcraft.yaml
fi

snapcraft clean
snapcraft
4 changes: 3 additions & 1 deletion packages/snap/snapcraft.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ parts:
plugin: dump
stage-packages: [ youtube-dl ]
stage:
- squirrelbot
- bin/*
- usr/*
prime:
- squirrelbot
- bin/*
- usr/*

apps:
squirrelbot:
command: env SQUIRRELBOT_CONFIG_FILE="$SNAP_COMMON/config.yaml" "$SNAP/bin/squirrelbot"
command: env SQUIRRELBOT_CONFIG_FILE="$SNAP_COMMON/config.yaml" "$SNAP/squirrelbot"
daemon: simple
plugs: [ home, network, network-bind ]

0 comments on commit 5de24a2

Please sign in to comment.