From f66fe125ea7aff203bcc079c5b037517c5358ec6 Mon Sep 17 00:00:00 2001 From: James Otting Date: Tue, 9 May 2023 18:52:54 -0400 Subject: [PATCH] RSDK-2996 Release Candidate Workflows (#2336) --- .github/workflows/appimage.yml | 56 ++++++++++++++++++--- .github/workflows/license_finder.yml | 22 +++++---- .github/workflows/main.yml | 12 +++-- .github/workflows/pullrequest-trusted.yml | 11 +++++ .github/workflows/releasecandidate.yml | 35 +++++++++++++ .github/workflows/stable.yml | 54 ++++++++++++++++++++ .github/workflows/staticbuild.yml | 57 +++++++++++++++++++--- .github/workflows/test.yml | 2 +- Makefile | 2 +- etc/packaging/appimages/package_release.sh | 12 ----- etc/packaging/static/package_release.sh | 13 ----- etc/tag_version.sh | 12 ----- etc/utils.sh | 22 --------- go.mod | 6 +-- go.sum | 12 ++--- packaging.make | 11 +++-- 16 files changed, 239 insertions(+), 100 deletions(-) create mode 100644 .github/workflows/releasecandidate.yml create mode 100644 .github/workflows/stable.yml delete mode 100755 etc/packaging/appimages/package_release.sh delete mode 100755 etc/packaging/static/package_release.sh delete mode 100755 etc/tag_version.sh delete mode 100755 etc/utils.sh diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index 8ce0113e70f..5c32b7e772a 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -3,6 +3,10 @@ name: Build AppImage on: workflow_dispatch: workflow_call: + inputs: + release_type: + required: true + type: string secrets: GCP_CREDENTIALS: required: true @@ -25,10 +29,10 @@ jobs: options: --platform ${{ matrix.platform }} timeout-minutes: 15 outputs: - date: ${{ steps.build_test_app.outputs.date }} + date: ${{ steps.build_date.outputs.date }} steps: - - name: Check out main branch code + - name: Check out code if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' uses: actions/checkout@v3 with: @@ -68,23 +72,44 @@ jobs: gzip: false - name: Build and Package (Latest) - id: build_test_app - if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' + if: inputs.release_type == 'latest' run: | - echo "date=`date +%F`" >> $GITHUB_OUTPUT sudo -Hu testbot bash -lc 'make BUILD_CHANNEL="latest" appimage' + - name: Build and Package (Tagged) + if: inputs.release_type == 'stable' || inputs.release_type == 'rc' + run: | + sudo -Hu testbot bash -lc 'make RELEASE_TYPE="${{ inputs.release_type }}" BUILD_CHANNEL="${{ github.ref_name }}" appimage' + + - name: Set Date + id: build_date + run: echo "date=`date +%F`" >> $GITHUB_OUTPUT + - name: Upload Files (Testing) if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' uses: google-github-actions/upload-cloud-storage@v0.10.4 with: headers: "cache-control: no-cache" path: 'etc/packaging/appimages/deploy/' - destination: 'packages.viam.com/apps/viam-server/testing/appimage/${{ steps.build_test_app.outputs.date }}/${{ github.sha }}/' + destination: 'packages.viam.com/apps/viam-server/testing/appimage/${{ steps.build_date.outputs.date }}/${{ github.sha }}/' glob: '*' parent: false gzip: false + output_summary: + name: Output Summary + runs-on: ubuntu-latest + needs: appimage + if: contains(github.event.pull_request.labels.*.name, 'appimage') || contains(github.event.pull_request.labels.*.name, 'appimage-ignore-tests') + steps: + - name: Display Download Links + run: | + channel="pr-${{ github.event.pull_request.number }}" + echo "### Built AppImages for ${channel}" >> $GITHUB_STEP_SUMMARY + echo "- arm64: https://storage.googleapis.com/packages.viam.com/apps/viam-server/viam-server-${channel}-aarch64.AppImage" >> $GITHUB_STEP_SUMMARY + echo "- x86_64: https://storage.googleapis.com/packages.viam.com/apps/viam-server/viam-server-${channel}-x86_64.AppImage" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + appimage_test: name: AppImage Test if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' @@ -106,10 +131,15 @@ jobs: - name: Test AppImage run: | + channel="${{ github.ref_name }}" + # we call our main branch releases "latest" + if [ "$channel" = "main" ]; then + channel="latest" + fi export TEST_DIR=`mktemp -d -t test-viam-server-XXXXXX` cd $TEST_DIR - curl -o viam-server https://storage.googleapis.com/packages.viam.com/apps/viam-server/testing/appimage/${{ needs.appimage.outputs.date }}/${{ github.sha }}/viam-server-latest-`uname -m`.AppImage + curl -o viam-server https://storage.googleapis.com/packages.viam.com/apps/viam-server/testing/appimage/${{ needs.appimage.outputs.date }}/${{ github.sha }}/viam-server-${channel}-`uname -m`.AppImage chmod 755 viam-server export RAND_PORT=$((30000 + $RANDOM)) @@ -141,3 +171,15 @@ jobs: - name: Publish AppImage run: | gsutil mv "gs://packages.viam.com/apps/viam-server/testing/appimage/${{ needs.appimage_test.outputs.date }}/${{ github.sha }}/*" "gs://packages.viam.com/apps/viam-server/" + + - name: Output Summary + run: | + channel="${{ github.ref_name }}" + # we call our main branch releases "latest" + if [ "$channel" == "main" ]; then + channel="latest" + fi + echo "### Built AppImages for ${channel}" >> $GITHUB_STEP_SUMMARY + echo "- arm64: https://storage.googleapis.com/packages.viam.com/apps/viam-server/viam-server-${channel}-aarch64.AppImage" >> $GITHUB_STEP_SUMMARY + echo "- x86_64: https://storage.googleapis.com/packages.viam.com/apps/viam-server/viam-server-${channel}-x86_64.AppImage" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/license_finder.yml b/.github/workflows/license_finder.yml index fe304a839db..592389da58f 100644 --- a/.github/workflows/license_finder.yml +++ b/.github/workflows/license_finder.yml @@ -3,9 +3,6 @@ name: License Finder on: workflow_dispatch: workflow_call: - pull_request: - branches: [ main ] - push: jobs: license_finder: @@ -17,11 +14,16 @@ jobs: timeout-minutes: 30 steps: - - name: Check out code in rdk directory - uses: actions/checkout@v3 - with: - fetch-depth: 2 + - name: Check out code + if: github.event_name != 'pull_request_target' + uses: actions/checkout@v3 - - name: Run license finder - run: | - sudo -Hu testbot bash -lc 'make license-check' + - name: Check out PR branch code + if: github.event_name == 'pull_request_target' + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Run license finder + run: | + sudo -Hu testbot bash -lc 'make license-check' diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 03a70eaf010..d1b4b44523c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: Main Branch Update +name: Build and Publish Latest concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -9,8 +9,6 @@ on: branches: [ main ] paths-ignore: - 'README.md' - tags: - - 'v[0-9]+.[0-9]+.[0-9]+' # To test workflow updates you need to work in a branch directly on viamrobotics/rdk # and tag your working branch instead of @main in any viamrobotics/rdk "uses" below. @@ -25,12 +23,16 @@ jobs: appimage: needs: test uses: viamrobotics/rdk/.github/workflows/appimage.yml@main + with: + release_type: 'latest' secrets: GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} staticbuild: needs: test uses: viamrobotics/rdk/.github/workflows/staticbuild.yml@main + with: + release_type: 'latest' secrets: GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} @@ -40,12 +42,16 @@ jobs: secrets: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + license_finder: + uses: viamrobotics/rdk/.github/workflows/license_finder.yml@main + slack-workflow-status: if: ${{ failure() }} name: Post Workflow Status To Slack needs: - test - appimage + - staticbuild runs-on: ubuntu-latest permissions: actions: 'read' diff --git a/.github/workflows/pullrequest-trusted.yml b/.github/workflows/pullrequest-trusted.yml index 1b3c1880b91..8f284b5db14 100644 --- a/.github/workflows/pullrequest-trusted.yml +++ b/.github/workflows/pullrequest-trusted.yml @@ -28,6 +28,8 @@ jobs: !contains(github.event.pull_request.labels.*.name, 'appimage-ignore-tests') && contains(github.event.pull_request.labels.*.name, 'appimage') && needs.test.result == 'success' uses: viamrobotics/rdk/.github/workflows/appimage.yml@main + with: + release_type: 'pr' secrets: GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} @@ -36,6 +38,8 @@ jobs: always() && !cancelled() && contains(github.event.pull_request.labels.*.name, 'safe to test') && contains(github.event.pull_request.labels.*.name, 'appimage-ignore-tests') uses: viamrobotics/rdk/.github/workflows/appimage.yml@main + with: + release_type: 'pr' secrets: GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} @@ -47,6 +51,8 @@ jobs: !contains(github.event.pull_request.labels.*.name, 'static-ignore-tests') && contains(github.event.pull_request.labels.*.name, 'static-build') && needs.test.result == 'success' uses: viamrobotics/rdk/.github/workflows/staticbuild.yml@main + with: + release_type: 'pr' secrets: GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} @@ -55,5 +61,10 @@ jobs: always() && !cancelled() && contains(github.event.pull_request.labels.*.name, 'safe to test') && contains(github.event.pull_request.labels.*.name, 'static-ignore-tests') uses: viamrobotics/rdk/.github/workflows/staticbuild.yml@main + with: + release_type: 'pr' secrets: GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} + + license_finder: + uses: viamrobotics/rdk/.github/workflows/license_finder.yml@main diff --git a/.github/workflows/releasecandidate.yml b/.github/workflows/releasecandidate.yml new file mode 100644 index 00000000000..cca11abb353 --- /dev/null +++ b/.github/workflows/releasecandidate.yml @@ -0,0 +1,35 @@ +name: Build and Publish RC + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+' + +# To test workflow updates you need to work in a branch directly on viamrobotics/rdk +# and tag your working branch instead of @main in any viamrobotics/rdk "uses" below. +# Don't forget to tag back to @main before merge. + +jobs: + test: + uses: viamrobotics/rdk/.github/workflows/test.yml@main + secrets: + MONGODB_TEST_OUTPUT_URI: ${{ secrets.MONGODB_TEST_OUTPUT_URI }} + + appimage: + needs: test + uses: viamrobotics/rdk/.github/workflows/appimage.yml@main + with: + release_type: 'rc' + secrets: + GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} + + staticbuild: + needs: test + uses: viamrobotics/rdk/.github/workflows/staticbuild.yml@main + with: + release_type: 'rc' + secrets: + GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} diff --git a/.github/workflows/stable.yml b/.github/workflows/stable.yml new file mode 100644 index 00000000000..9b31b0d965e --- /dev/null +++ b/.github/workflows/stable.yml @@ -0,0 +1,54 @@ +name: Build and Publish Stable + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + +# To test workflow updates you need to work in a branch directly on viamrobotics/rdk +# and tag your working branch instead of @main in any viamrobotics/rdk "uses" below. +# Don't forget to tag back to @main before merge. + +jobs: + test: + uses: viamrobotics/rdk/.github/workflows/test.yml@main + secrets: + MONGODB_TEST_OUTPUT_URI: ${{ secrets.MONGODB_TEST_OUTPUT_URI }} + + appimage: + needs: test + uses: viamrobotics/rdk/.github/workflows/appimage.yml@main + with: + release_type: 'stable' + secrets: + GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} + + staticbuild: + needs: test + uses: viamrobotics/rdk/.github/workflows/staticbuild.yml@main + with: + release_type: 'stable' + secrets: + GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} + + slack-workflow-status: + if: ${{ failure() }} + name: Post Workflow Status To Slack + needs: + - test + - appimage + - staticbuild + runs-on: ubuntu-latest + permissions: + actions: 'read' + steps: + - name: Slack Workflow Notification + uses: Gamesight/slack-workflow-status@master + with: + repo_token: ${{secrets.GITHUB_TOKEN}} + slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}} + channel: '#team-devops' + name: 'Workflow Status' diff --git a/.github/workflows/staticbuild.yml b/.github/workflows/staticbuild.yml index 043d27e7277..12558985cab 100644 --- a/.github/workflows/staticbuild.yml +++ b/.github/workflows/staticbuild.yml @@ -3,6 +3,10 @@ name: Build Semi-Static Binary on: workflow_dispatch: workflow_call: + inputs: + release_type: + required: true + type: string secrets: GCP_CREDENTIALS: required: true @@ -25,10 +29,10 @@ jobs: options: --platform ${{ matrix.platform }} timeout-minutes: 15 outputs: - date: ${{ steps.build_test_binary.outputs.date }} + date: ${{ steps.build_date.outputs.date }} steps: - - name: Check out main branch code + - name: Check out code if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' uses: actions/checkout@v3 with: @@ -68,23 +72,44 @@ jobs: gzip: false - name: Build (Latest) - id: build_test_binary - if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' + if: inputs.release_type == 'latest' run: | - echo "date=`date +%F`" >> $GITHUB_OUTPUT sudo -Hu testbot bash -lc 'make BUILD_CHANNEL="latest" static-release' + - name: Build (Tagged) + if: inputs.release_type == 'stable' || inputs.release_type == 'rc' + run: | + sudo -Hu testbot bash -lc 'make RELEASE_TYPE="${{ inputs.release_type }}" BUILD_CHANNEL="${{ github.ref_name }}" static-release' + + - name: Set Date + id: build_date + run: echo "date=`date +%F`" >> $GITHUB_OUTPUT + - name: Upload Files (Testing) if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' uses: google-github-actions/upload-cloud-storage@v0.10.4 with: headers: "cache-control: no-cache" path: 'etc/packaging/static/deploy/' - destination: 'packages.viam.com/apps/viam-server/testing/static/${{ steps.build_test_binary.outputs.date }}/${{ github.sha }}/' + destination: 'packages.viam.com/apps/viam-server/testing/static/${{ steps.build_date.outputs.date }}/${{ github.sha }}/' glob: 'viam-server-*' parent: false gzip: false + output_summary: + name: Output Summary + runs-on: ubuntu-latest + needs: static + if: contains(github.event.pull_request.labels.*.name, 'static-build') || contains(github.event.pull_request.labels.*.name, 'static-ignore-tests') + steps: + - name: Output Summary + run: | + channel="pr-${{ github.event.pull_request.number }}" + echo "### Built Static Binaries for ${channel}" >> $GITHUB_STEP_SUMMARY + echo "- arm64: https://storage.googleapis.com/packages.viam.com/apps/viam-server/viam-server-${channel}-aarch64" >> $GITHUB_STEP_SUMMARY + echo "- x86_64: https://storage.googleapis.com/packages.viam.com/apps/viam-server/viam-server-${channel}-x86_64" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + static_test: name: Static Test if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' @@ -106,10 +131,16 @@ jobs: - name: Test Static Binary run: | + channel="${{ github.ref_name }}" + # we call our main branch releases "latest" + if [ "$channel" = "main" ]; then + channel="latest" + fi + export TEST_DIR=`mktemp -d -t test-viam-server-XXXXXX` cd $TEST_DIR - curl -o viam-server https://storage.googleapis.com/packages.viam.com/apps/viam-server/testing/static/${{ needs.static.outputs.date }}/${{ github.sha }}/viam-server-latest-`uname -m` + curl -o viam-server https://storage.googleapis.com/packages.viam.com/apps/viam-server/testing/static/${{ needs.static.outputs.date }}/${{ github.sha }}/viam-server-${channel}-`uname -m` chmod 755 viam-server export RAND_PORT=$((30000 + $RANDOM)) @@ -141,3 +172,15 @@ jobs: - name: Publish Static Binary run: | gsutil mv "gs://packages.viam.com/apps/viam-server/testing/static/${{ needs.static_test.outputs.date }}/${{ github.sha }}/*" "gs://packages.viam.com/apps/viam-server/" + + - name: Output Summary + run: | + channel="${{ github.ref_name }}" + # we call our main branch releases "latest" + if [ "$channel" == "main" ]; then + channel="latest" + fi + echo "### Built Static Binaries for ${channel}" >> $GITHUB_STEP_SUMMARY + echo "- arm64: https://storage.googleapis.com/packages.viam.com/apps/viam-server/viam-server-${channel}-aarch64" >> $GITHUB_STEP_SUMMARY + echo "- x86_64: https://storage.googleapis.com/packages.viam.com/apps/viam-server/viam-server-${channel}-x86_64" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d7c76b11057..6224323a038 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,7 +31,7 @@ jobs: timeout-minutes: 30 steps: - - name: Check out main branch code + - name: Check out code if: github.event_name != 'pull_request_target' uses: actions/checkout@v3 with: diff --git a/Makefile b/Makefile index 8a974f49533..437f2db7126 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ TOOL_BIN = bin/gotools/$(shell uname -s)-$(shell uname -m) PATH_WITH_TOOLS="`pwd`/$(TOOL_BIN):`pwd`/node_modules/.bin:${PATH}" GIT_REVISION = $(shell git rev-parse HEAD | tr -d '\n') -TAG_VERSION?=$(shell etc/tag_version.sh) +TAG_VERSION?=$(shell git tag --points-at | sort -Vr | head -n1) LDFLAGS = -ldflags "-s -w -extld="$(shell pwd)/etc/ld_wrapper.sh" -X 'go.viam.com/rdk/config.Version=${TAG_VERSION}' -X 'go.viam.com/rdk/config.GitRevision=${GIT_REVISION}'" default: build lint server diff --git a/etc/packaging/appimages/package_release.sh b/etc/packaging/appimages/package_release.sh deleted file mode 100755 index e116929d45d..00000000000 --- a/etc/packaging/appimages/package_release.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -set -e -SELF=$(realpath $0) -source "$(dirname $SELF)/../../utils.sh" - -if get_version_tag > /dev/null -then - CUR_TAG=$(get_version_tag) - BUILD_CHANNEL=stable appimage-builder --recipe viam-server-`uname -m`.yml - BUILD_CHANNEL=$CUR_TAG appimage-builder --recipe viam-server-`uname -m`.yml -fi diff --git a/etc/packaging/static/package_release.sh b/etc/packaging/static/package_release.sh deleted file mode 100755 index 78f726ba0d4..00000000000 --- a/etc/packaging/static/package_release.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -set -e -cd $(dirname $(realpath $0)) -source "../../utils.sh" - -if get_version_tag > /dev/null -then - BIN_SRC="../../../bin/$(uname -s)-$(uname -m)" - mkdir -p deploy - cp "${BIN_SRC}/viam-server" "deploy/viam-server-$(get_version_tag)-$(uname -m)" - cp "${BIN_SRC}/viam-server" "deploy/viam-server-stable-$(uname -m)" -fi diff --git a/etc/tag_version.sh b/etc/tag_version.sh deleted file mode 100755 index 113416b26bb..00000000000 --- a/etc/tag_version.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -set -e -SELF=$(realpath $0) -source "$(dirname $SELF)/utils.sh" -fn_name="get_version_tag" - -if declare -F "$fn_name" > /dev/null -then - echo $($fn_name) -fi -exit 0 diff --git a/etc/utils.sh b/etc/utils.sh deleted file mode 100755 index 0a86dbd9eb0..00000000000 --- a/etc/utils.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -# This is a helper function to determine if the current git commit constitutes a new release. -# Specifically, is it tagged in the format "v1.2.3" and a higher version than any other tags. -# This is used for internal tagging and release building. -get_version_tag() { - set -e - CUR_TAG=`git tag --points-at | sort -Vr | head -n1` - if [[ $CUR_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] - then - NEWEST_TAG=`git tag -l "v*.*.*" | sort -Vr | head -n1` - if [[ $CUR_TAG == $NEWEST_TAG ]] - then - echo $CUR_TAG - return 0 - else - echo "latest" - return 128 - fi - fi - return 1 -} diff --git a/go.mod b/go.mod index faef958c37c..24171e3ae3f 100644 --- a/go.mod +++ b/go.mod @@ -65,7 +65,7 @@ require ( github.com/pion/mediadevices v0.4.1-0.20230424151458-cadb1557556f github.com/pion/rtp v1.7.13 github.com/pion/webrtc/v3 v3.1.61 - github.com/rhysd/actionlint v1.6.23 + github.com/rhysd/actionlint v1.6.24 github.com/rs/cors v1.9.0 github.com/sergi/go-diff v1.3.1 github.com/sjwhitworth/golearn v0.0.0-20211014193759-a8b69c276cd8 @@ -162,7 +162,7 @@ require ( github.com/esimonov/ifshort v1.0.4 // indirect github.com/ettle/strcase v0.1.1 // indirect github.com/fatih/camelcase v1.0.0 // indirect - github.com/fatih/color v1.14.1 // indirect + github.com/fatih/color v1.15.0 // indirect github.com/fatih/structtag v1.2.0 // indirect github.com/firefart/nonamedreturns v1.0.4 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect @@ -256,7 +256,7 @@ require ( github.com/maratori/testpackage v1.1.0 // indirect github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mattn/go-isatty v0.0.18 // indirect github.com/mattn/go-pointer v0.0.1 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect github.com/mbilski/exhaustivestruct v1.2.0 // indirect diff --git a/go.sum b/go.sum index 08f831cd003..7688a44a66b 100644 --- a/go.sum +++ b/go.sum @@ -362,8 +362,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= -github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/firefart/nonamedreturns v1.0.4 h1:abzI1p7mAEPYuR4A+VLKn4eNDOycjYo2phmY9sfv40Y= @@ -952,8 +952,8 @@ github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOA github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= +github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-pointer v0.0.1 h1:n+XhsuGeVO6MEAp7xyEukFINEa+Quek5psIR/ylA6o0= github.com/mattn/go-pointer v0.0.1/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= @@ -1256,8 +1256,8 @@ github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:r github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rhysd/actionlint v1.6.23 h1:041VOXgZddfvSJa9Il+WT3Iwuo/j0Nmu4bhpAScrds4= -github.com/rhysd/actionlint v1.6.23/go.mod h1:o5qc1K3I9taGMBhL7mVkpRd64hx3YqI+3t8ewGfYXfE= +github.com/rhysd/actionlint v1.6.24 h1:5f61cF5ssP2pzG0jws5bEsfZBNhbBcO9nl7vTzVKjzs= +github.com/rhysd/actionlint v1.6.24/go.mod h1:gQmz9r2wlcpLy+VdbzK0GINJQnAK5/sNH3BpwW4Mt5I= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= diff --git a/packaging.make b/packaging.make index 4dd359b4d58..8252584fb37 100644 --- a/packaging.make +++ b/packaging.make @@ -3,7 +3,10 @@ BUILD_CHANNEL?=local appimage: NO_UPX=1 appimage: server-static cd etc/packaging/appimages && BUILD_CHANNEL=${BUILD_CHANNEL} appimage-builder --recipe viam-server-`uname -m`.yml - cd etc/packaging/appimages && ./package_release.sh + if [ "${RELEASE_TYPE}" = "stable" ]; then \ + cd etc/packaging/appimages; \ + BUILD_CHANNEL=stable appimage-builder --recipe viam-server-`uname -m`.yml; \ + fi mkdir -p etc/packaging/appimages/deploy/ mv etc/packaging/appimages/*.AppImage* etc/packaging/appimages/deploy/ chmod 755 etc/packaging/appimages/deploy/*.AppImage @@ -23,5 +26,7 @@ appimage-deploy: static-release: server-static rm -rf etc/packaging/static/deploy/ mkdir -p etc/packaging/static/deploy/ - cp $(BIN_OUTPUT_PATH)/viam-server etc/packaging/static/deploy/viam-server-${BUILD_CHANNEL}-$(shell uname -m) - cd etc/packaging/static && ./package_release.sh + cp $(BIN_OUTPUT_PATH)/viam-server etc/packaging/static/deploy/viam-server-${BUILD_CHANNEL}-`uname -m` + if [ "${RELEASE_TYPE}" = "stable" ]; then \ + cp $(BIN_OUTPUT_PATH)/viam-server etc/packaging/static/deploy/viam-server-stable-`uname -m`; \ + fi