Chat updates (#92)

* Send PONG responses to PINGs

* Split out client IDs for viewer counts vs. websocket IDs

* WIP username change event

* Display username changes

* Revert commented out code

* Add support for building from the current branch

* Fix PONG

* Make username changes have a unique ID

* Add a version param to js to cachebust
This commit is contained in:
Gabe Kangas
2020-07-28 21:30:03 -07:00
committed by GitHub
parent 87636a4183
commit d9509f5606
9 changed files with 161 additions and 47 deletions

View File

@@ -17,7 +17,7 @@ fi
[[ -z "${VERSION}" ]] && VERSION='unknownver' || VERSION="${VERSION}"
GIT_COMMIT=$(git rev-list -1 HEAD)
GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
# Change to the root directory of the repository
cd $(git rev-parse --show-toplevel)
@@ -35,7 +35,7 @@ build() {
VERSION=$4
GIT_COMMIT=$5
echo "Building ${NAME} (${OS}/${ARCH}) release..."
echo "Building ${NAME} (${OS}/${ARCH}) release from ${GIT_BRANCH}..."
mkdir -p dist/${NAME}
mkdir -p dist/${NAME}/webroot/static
@@ -51,7 +51,7 @@ build() {
pushd dist/${NAME} >> /dev/null
CGO_ENABLED=1 ~/go/bin/xgo -ldflags "-s -w -X main.GitCommit=${GIT_COMMIT} -X main.BuildVersion=${VERSION} -X main.BuildType=${NAME}" -targets "${OS}/${ARCH}" github.com/gabek/owncast
CGO_ENABLED=1 ~/go/bin/xgo --branch ${GIT_BRANCH} -ldflags "-s -w -X main.GitCommit=${GIT_COMMIT} -X main.BuildVersion=${VERSION} -X main.BuildType=${NAME}" -targets "${OS}/${ARCH}" github.com/gabek/owncast
mv owncast-*-${ARCH} owncast
zip -r -q -8 ../owncast-$NAME-$VERSION.zip .