diff --git a/build.sh b/build.sh new file mode 100755 index 00000000..8c6b18a9 --- /dev/null +++ b/build.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +if ! command -v jq &> /dev/null +then + echo "'jq' could not be found. Please install this utility" + exit +fi + +if [ -z "$1" ] +then + echo "Version is required, command usage example: ./build.sh '' " + exit +fi + +if [ -z "$2" ] +then + echo "Package name is required, command usage example: ./build.sh '' " + exit +fi + +mv package.json pkg-temp.json +jq --arg vs "$1" -r '. + {dev:false, version:$vs}' pkg-temp.json > package.json +rm pkg-temp.json +cat package.json + +docker build -f dev/build/Dockerfile -t "$2:$1" . +docker tag "$2:$1" "$2:latest" + +docker push "$2:$1" +docker push "$2:latest" + +git checkout package.json diff --git a/server/graph/resolvers/page.js b/server/graph/resolvers/page.js index e356ac0f..11d6b4d4 100644 --- a/server/graph/resolvers/page.js +++ b/server/graph/resolvers/page.js @@ -244,7 +244,7 @@ module.exports = { builder.andWhere('isFolder', true) break case 'PAGES': - builder.andWhereNotNull('pageId') + builder.whereNotNull('pageId') break } if (!args.parent || args.parent < 1) {