Rename nightly to staging and have it point to dev infra (#7422)

* Rename nightly to staging and have it point to dev infra
Fixes #7421

* To revert: force IS_STAGING

* chmod +x ./scripts/flip-files-to-staging.sh

* Fix mix up dev and prod

* Revert "To revert: force IS_STAGING"

This reverts commit 0178604a55.
This commit is contained in:
Pierre Jacquier
2025-06-09 15:43:48 -04:00
committed by GitHub
parent 1cd742df5d
commit dd4d0f6d98
15 changed files with 84 additions and 84 deletions

View File

@ -10,7 +10,7 @@ on:
env: env:
IS_RELEASE: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }} IS_RELEASE: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
IS_NIGHTLY: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} IS_STAGING: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}
@ -91,14 +91,14 @@ jobs:
if: ${{ steps.wasm.outputs.should-build-wasm == 'true' }} if: ${{ steps.wasm.outputs.should-build-wasm == 'true' }}
run: "npm run build:wasm" run: "npm run build:wasm"
- name: Set nightly version, product name, release notes, and icons - name: Set staging version, product name, release notes, and icons
if: ${{ env.IS_NIGHTLY == 'true' }} if: ${{ env.IS_STAGING == 'true' }}
run: | run: |
COMMIT=$(git rev-parse --short HEAD) COMMIT=$(git rev-parse --short HEAD)
DATE=$(date +'%-y.%-m.%-d') DATE=$(date +'%-y.%-m.%-d')
export VERSION=$DATE-main.$COMMIT export VERSION=$DATE-main.$COMMIT
npm run files:set-version npm run files:set-version
npm run files:flip-to-nightly npm run files:flip-to-staging
- name: Set release version - name: Set release version
if: ${{ env.IS_RELEASE == 'true' }} if: ${{ env.IS_RELEASE == 'true' }}
@ -167,7 +167,7 @@ jobs:
- run: npm install - run: npm install
- name: Prepare certificate and variables (Windows only) - name: Prepare certificate and variables (Windows only)
if: ${{ (env.IS_RELEASE == 'true' || env.IS_NIGHTLY == 'true') && matrix.platform == 'win' }} if: ${{ (env.IS_RELEASE == 'true' || env.IS_STAGING == 'true') && matrix.platform == 'win' }}
run: | run: |
echo "${{secrets.SM_CLIENT_CERT_FILE_B64 }}" | base64 --decode > /c/Certificate_pkcs12.p12 echo "${{secrets.SM_CLIENT_CERT_FILE_B64 }}" | base64 --decode > /c/Certificate_pkcs12.p12
cat /c/Certificate_pkcs12.p12 cat /c/Certificate_pkcs12.p12
@ -182,7 +182,7 @@ jobs:
shell: bash shell: bash
- name: Setup certicate with SSM KSP (Windows only) - name: Setup certicate with SSM KSP (Windows only)
if: ${{ (env.IS_RELEASE == 'true' || env.IS_NIGHTLY == 'true') && matrix.platform == 'win' }} if: ${{ (env.IS_RELEASE == 'true' || env.IS_STAGING == 'true') && matrix.platform == 'win' }}
run: | run: |
curl -X GET https://one.digicert.com/signingmanager/api-ui/v1/releases/smtools-windows-x64.msi/download -H "x-api-key:%SM_API_KEY%" -o smtools-windows-x64.msi curl -X GET https://one.digicert.com/signingmanager/api-ui/v1/releases/smtools-windows-x64.msi/download -H "x-api-key:%SM_API_KEY%" -o smtools-windows-x64.msi
msiexec /i smtools-windows-x64.msi /quiet /qn msiexec /i smtools-windows-x64.msi /quiet /qn
@ -192,7 +192,7 @@ jobs:
smksp_cert_sync.exe smksp_cert_sync.exe
smctl windows certsync smctl windows certsync
# This last line `smctl windows certsync` was added after windows codesign failures started happening # This last line `smctl windows certsync` was added after windows codesign failures started happening
# with nightly-v25.4.10. It looks like `smksp_cert_sync.exe` used to do the sync to the local cert store, # with staging-v25.4.10. It looks like `smksp_cert_sync.exe` used to do the sync to the local cert store,
# but stopped doing it overnight. This extra call that I randomly got from this azure-related doc page # but stopped doing it overnight. This extra call that I randomly got from this azure-related doc page
# https://docs.digicert.com/en/digicert-keylocker/code-signing/sign-with-third-party-signing-tools/windows-applications/sign-azure-apps-with-signtool-using-ksp-library.html#sync-certificates--windows-only--618365 # https://docs.digicert.com/en/digicert-keylocker/code-signing/sign-with-third-party-signing-tools/windows-applications/sign-azure-apps-with-signtool-using-ksp-library.html#sync-certificates--windows-only--618365
# seems to be doing that extra sync that we need for scripts/sign-win.js to work. # seems to be doing that extra sync that we need for scripts/sign-win.js to work.
@ -200,13 +200,13 @@ jobs:
shell: cmd shell: cmd
- name: Build the app (debug) - name: Build the app (debug)
if: ${{ env.IS_RELEASE == 'false' && env.IS_NIGHTLY == 'false' }} if: ${{ env.IS_RELEASE == 'false' && env.IS_STAGING == 'false' }}
# electron-builder doesn't have a concept of release vs debug, # electron-builder doesn't have a concept of release vs debug,
# this is just not doing any codesign or release yml generation, and points to dev infra # this is just not doing any codesign or release yml generation, and points to dev infra
run: npm run tronb:package:dev run: npm run tronb:package:dev
- name: Build the app (release) - name: Build the app (release)
if: ${{ env.IS_RELEASE == 'true' || env.IS_NIGHTLY == 'true' }} if: ${{ env.IS_RELEASE == 'true' || env.IS_STAGING == 'true' }}
env: env:
APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
@ -216,7 +216,7 @@ jobs:
CSC_KEY_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} CSC_KEY_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
CSC_KEYCHAIN: ${{ secrets.APPLE_SIGNING_IDENTITY }} CSC_KEYCHAIN: ${{ secrets.APPLE_SIGNING_IDENTITY }}
WINDOWS_CERTIFICATE_THUMBPRINT: ${{ secrets.WINDOWS_CERTIFICATE_THUMBPRINT }} WINDOWS_CERTIFICATE_THUMBPRINT: ${{ secrets.WINDOWS_CERTIFICATE_THUMBPRINT }}
run: npm run tronb:package:prod run: npm run tronb:package:${{ env.IS_STAGING == 'true' && 'dev' || 'prod' }}
- name: List artifacts in out/ - name: List artifacts in out/
run: ls -R out run: ls -R out
@ -240,20 +240,20 @@ jobs:
out/*-x86_64-linux.* out/*-x86_64-linux.*
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
if: ${{ env.IS_RELEASE == 'true' || env.IS_NIGHTLY == 'true' }} if: ${{ env.IS_RELEASE == 'true' || env.IS_STAGING == 'true' }}
with: with:
name: out-yml-${{ matrix.platform }} name: out-yml-${{ matrix.platform }}
path: | path: |
out/latest*.yml out/latest*.yml
# TODO: add the 'Build for Mac TestFlight (nightly)' stage back # TODO: add the 'Build for Mac TestFlight' stage back
upload-apps-release: upload-apps-release:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
permissions: permissions:
contents: write contents: write
# Equivalent to IS_RELEASE || IS_NIGHTLY (but we can't access those env vars here) # Equivalent to IS_RELEASE || IS_STAGING (but we can't access those env vars here)
if: ${{ (github.ref_type == 'tag' && startsWith(github.ref_name, 'v')) || (github.event_name == 'push' && github.ref == 'refs/heads/main') }} if: ${{ (github.ref_type == 'tag' && startsWith(github.ref_name, 'v')) || (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
env: env:
VERSION_NO_V: ${{ needs.prepare-files.outputs.version }} VERSION_NO_V: ${{ needs.prepare-files.outputs.version }}
@ -311,8 +311,8 @@ jobs:
env: env:
NOTES: ${{ needs.prepare-files.outputs.notes }} NOTES: ${{ needs.prepare-files.outputs.notes }}
PUB_DATE: ${{ github.event.repository.updated_at }} PUB_DATE: ${{ github.event.repository.updated_at }}
WEBSITE_DIR: ${{ env.IS_NIGHTLY == 'true' && 'dl.zoo.dev/releases/modeling-app/nightly' || 'dl.zoo.dev/releases/modeling-app' }} WEBSITE_DIR: ${{ env.IS_STAGING == 'true' && 'dl.zoo.dev/releases/modeling-app/staging' || 'dl.zoo.dev/releases/modeling-app' }}
URL_CODED_NAME: ${{ env.IS_NIGHTLY == 'true' && 'Zoo%20Design%20Studio%20%28Nightly%29' || 'Zoo%20Design%20Studio' }} URL_CODED_NAME: ${{ env.IS_STAGING == 'true' && 'Zoo%20Design%20Studio%20%28Staging%29' || 'Zoo%20Design%20Studio' }}
run: | run: |
RELEASE_DIR=https://${WEBSITE_DIR} RELEASE_DIR=https://${WEBSITE_DIR}
jq --null-input \ jq --null-input \
@ -361,26 +361,26 @@ jobs:
run: "ls -R out" run: "ls -R out"
- name: Authenticate to Google Cloud - name: Authenticate to Google Cloud
if: ${{ env.IS_NIGHTLY == 'true' }} if: ${{ env.IS_STAGING == 'true' }}
uses: 'google-github-actions/auth@v2.1.8' uses: 'google-github-actions/auth@v2.1.8'
with: with:
credentials_json: '${{ secrets.GOOGLE_CLOUD_DL_SA }}' credentials_json: '${{ secrets.GOOGLE_CLOUD_DL_SA }}'
- name: Set up Google Cloud SDK - name: Set up Google Cloud SDK
if: ${{ env.IS_NIGHTLY == 'true' }} if: ${{ env.IS_STAGING == 'true' }}
uses: google-github-actions/setup-gcloud@v2.1.4 uses: google-github-actions/setup-gcloud@v2.1.4
with: with:
project_id: ${{ env.GOOGLE_CLOUD_PROJECT_ID }} project_id: ${{ env.GOOGLE_CLOUD_PROJECT_ID }}
- name: Upload nightly files to public bucket - name: Upload staging files to public bucket
if: ${{ env.IS_NIGHTLY == 'true' }} if: ${{ env.IS_STAGING == 'true' }}
uses: google-github-actions/upload-cloud-storage@v2.2.2 uses: google-github-actions/upload-cloud-storage@v2.2.2
with: with:
path: out path: out
glob: '*' glob: '*'
parent: false parent: false
destination: 'dl.kittycad.io/releases/modeling-app/nightly' destination: 'dl.kittycad.io/releases/modeling-app/staging'
- name: Invalidate bucket cache on latest*.yml and last_download.json files - name: Invalidate bucket cache on latest*.yml and last_download.json files
if: ${{ env.IS_NIGHTLY == 'true' }} if: ${{ env.IS_STAGING == 'true' }}
run: npm run files:invalidate-bucket:nightly run: npm run files:invalidate-bucket:staging

View File

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 119 KiB

View File

Before

Width:  |  Height:  |  Size: 259 KiB

After

Width:  |  Height:  |  Size: 259 KiB

View File

@ -116,10 +116,10 @@
"circular-deps:diff:nodejs": "npm run circular-deps:diff || node ./scripts/diff.js", "circular-deps:diff:nodejs": "npm run circular-deps:diff || node ./scripts/diff.js",
"files:set-version": "echo \"$(jq --arg v \"$VERSION\" '.version=$v' package.json --indent 2)\" > package.json", "files:set-version": "echo \"$(jq --arg v \"$VERSION\" '.version=$v' package.json --indent 2)\" > package.json",
"files:set-notes": "./scripts/set-files-notes.sh", "files:set-notes": "./scripts/set-files-notes.sh",
"files:flip-to-nightly": "./scripts/flip-files-to-nightly.sh", "files:flip-to-staging": "./scripts/flip-files-to-staging.sh",
"files:flip-to-nightly:windows": "powershell -ExecutionPolicy Bypass -File ./scripts/flip-files-to-nightly.ps1", "files:flip-to-staging:windows": "powershell -ExecutionPolicy Bypass -File ./scripts/flip-files-to-staging.ps1",
"files:invalidate-bucket": "./scripts/invalidate-files-bucket.sh", "files:invalidate-bucket": "./scripts/invalidate-files-bucket.sh",
"files:invalidate-bucket:nightly": "./scripts/invalidate-files-bucket.sh --nightly", "files:invalidate-bucket:staging": "./scripts/invalidate-files-bucket.sh --staging",
"postinstall": "electron-rebuild", "postinstall": "electron-rebuild",
"generate:machine-api": "npx openapi-typescript ./openapi/machine-api.json -o src/lib/machine-api.d.ts", "generate:machine-api": "npx openapi-typescript ./openapi/machine-api.json -o src/lib/machine-api.d.ts",
"tron:start": "electron-forge start", "tron:start": "electron-forge start",

View File

@ -1,20 +0,0 @@
$VERSION=$(Get-Date -Format "yy.M.d")
$COMMIT=$(git rev-parse --short HEAD)
$PRODUCT_NAME="Zoo Design Studio (Nightly)"
# package.json
yq -i '.version = env(VERSION)' -p=json -o=json package.json
yq -i '.productName = env(PRODUCT_NAME)' -p=json -o=json package.json
yq -i '.name = "zoo-modeling-app-nightly"' -p=json -o=json package.json
# electron-builder.yml
yq -i '.publish[0].url = "https://dl.zoo.dev/releases/modeling-app/nightly"' electron-builder.yml
yq -i '.appId = "dev.zoo.modeling-app-nightly"' electron-builder.yml
yq -i '.nsis.include = "./scripts/installer-nightly.nsh"' electron-builder.yml
# Release notes
echo "Nightly build $VERSION (commit $COMMIT)" > release-notes.md
# icons
cp assets/icon-nightly.png assets/icon.png
cp assets/icon-nightly.ico assets/icon.ico

View File

@ -1,20 +0,0 @@
#!/bin/bash
COMMIT=$(git rev-parse --short HEAD)
TITLE=$(git show -s --format=%s $COMMIT)
# package.json
PACKAGE=$(jq '.productName="Zoo Design Studio (Nightly)" | .name="zoo-modeling-app-nightly"' package.json --indent 2)
echo "$PACKAGE" > package.json
# electron-builder.yml
yq -i '.publish[0].url = "https://dl.zoo.dev/releases/modeling-app/nightly"' electron-builder.yml
yq -i '.appId = "dev.zoo.modeling-app-nightly"' electron-builder.yml
yq -i '.nsis.include = "./scripts/installer-nightly.nsh"' electron-builder.yml
# Release notes
echo "[$TITLE](https://github.com/KittyCAD/modeling-app/commit/$COMMIT)" > release-notes.md
# icons
cp assets/icon-nightly.png assets/icon.png
cp assets/icon-nightly.ico assets/icon.ico

View File

@ -0,0 +1,20 @@
$VERSION=$(Get-Date -Format "yy.M.d")
$COMMIT=$(git rev-parse --short HEAD)
$PRODUCT_NAME="Zoo Design Studio (Staging)"
# package.json
yq -i '.version = env(VERSION)' -p=json -o=json package.json
yq -i '.productName = env(PRODUCT_NAME)' -p=json -o=json package.json
yq -i '.name = "zoo-modeling-app-staging"' -p=json -o=json package.json
# electron-builder.yml
yq -i '.publish[0].url = "https://dl.zoo.dev/releases/modeling-app/staging"' electron-builder.yml
yq -i '.appId = "dev.zoo.modeling-app-staging"' electron-builder.yml
yq -i '.nsis.include = "./scripts/installer-staging.nsh"' electron-builder.yml
# Release notes
echo "Staging build $VERSION (commit $COMMIT)" > release-notes.md
# icons
cp assets/icon-staging.png assets/icon.png
cp assets/icon-staging.ico assets/icon.ico

View File

@ -0,0 +1,20 @@
#!/bin/bash
COMMIT=$(git rev-parse --short HEAD)
TITLE=$(git show -s --format=%s $COMMIT)
# package.json
PACKAGE=$(jq '.productName="Zoo Design Studio (Staging)" | .name="zoo-modeling-app-staging"' package.json --indent 2)
echo "$PACKAGE" > package.json
# electron-builder.yml
yq -i '.publish[0].url = "https://dl.zoo.dev/releases/modeling-app/staging"' electron-builder.yml
yq -i '.appId = "dev.zoo.modeling-app-staging"' electron-builder.yml
yq -i '.nsis.include = "./scripts/installer-staging.nsh"' electron-builder.yml
# Release notes
echo "[$TITLE](https://github.com/KittyCAD/modeling-app/commit/$COMMIT)" > release-notes.md
# icons
cp assets/icon-staging.png assets/icon.png
cp assets/icon-staging.ico assets/icon.ico

View File

@ -1,8 +1,8 @@
!macro preInit !macro preInit
SetRegView 64 SetRegView 64
WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Program Files\Zoo Design Studio (Nightly)" WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Program Files\Zoo Design Studio (Staging)"
WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Program Files\Zoo Design Studio (Nightly)" WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Program Files\Zoo Design Studio (Staging)"
SetRegView 32 SetRegView 32
WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Program Files\Zoo Design Studio (Nightly)" WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Program Files\Zoo Design Studio (Staging)"
WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Program Files\Zoo Design Studio (Nightly)" WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Program Files\Zoo Design Studio (Staging)"
!macroend !macroend

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
base_dir="/releases/modeling-app" base_dir="/releases/modeling-app"
if [[ $1 = "--nightly" ]]; then if [[ $1 = "--staging" ]]; then
base_dir="/releases/modeling-app/nightly" base_dir="/releases/modeling-app/staging"
fi fi
echo "Invalidating json and yml files at $base_dir in the download bucket" echo "Invalidating json and yml files at $base_dir in the download bucket"

View File

@ -5,7 +5,7 @@ import toast from 'react-hot-toast'
import { ActionButton } from '@src/components/ActionButton' import { ActionButton } from '@src/components/ActionButton'
import { SafeRenderer } from '@src/lib/markdown' import { SafeRenderer } from '@src/lib/markdown'
import { openExternalBrowserIfDesktop } from '@src/lib/openWindow' import { openExternalBrowserIfDesktop } from '@src/lib/openWindow'
import { getReleaseUrl, IS_NIGHTLY_OR_DEBUG } from '@src/routes/utils' import { getReleaseUrl, IS_STAGING_OR_DEBUG } from '@src/routes/utils'
export function ToastUpdate({ export function ToastUpdate({
version, version,
@ -42,7 +42,7 @@ export function ToastUpdate({
</span> </span>
<p className="ml-4 text-md text-bold"> <p className="ml-4 text-md text-bold">
A new update is available. A new update is available.
{!IS_NIGHTLY_OR_DEBUG && ( {!IS_STAGING_OR_DEBUG && (
<span> <span>
{' '} {' '}
You can view the release notes{' '} You can view the release notes{' '}

View File

@ -16,7 +16,7 @@ import type {
StateMachineCommandSetSchema, StateMachineCommandSetSchema,
} from '@src/lib/commandTypes' } from '@src/lib/commandTypes'
import { isDesktop } from '@src/lib/isDesktop' import { isDesktop } from '@src/lib/isDesktop'
import { IS_NIGHTLY_OR_DEBUG } from '@src/routes/utils' import { IS_STAGING_OR_DEBUG } from '@src/routes/utils'
interface CreateMachineCommandProps< interface CreateMachineCommandProps<
T extends AnyStateMachine, T extends AnyStateMachine,
@ -89,7 +89,7 @@ export function createMachineCommand<
} else if ('status' in commandConfig) { } else if ('status' in commandConfig) {
const { status } = commandConfig const { status } = commandConfig
if (status === 'inactive') return null if (status === 'inactive') return null
if (status === 'development' && !(DEV || IS_NIGHTLY_OR_DEBUG)) return null if (status === 'development' && !(DEV || IS_STAGING_OR_DEBUG)) return null
} }
const icon = ('icon' in commandConfig && commandConfig.icon) || undefined const icon = ('icon' in commandConfig && commandConfig.icon) || undefined

View File

@ -25,7 +25,7 @@ import type { FileEntry, FileMetadata, Project } from '@src/lib/project'
import { err } from '@src/lib/trap' import { err } from '@src/lib/trap'
import type { DeepPartial } from '@src/lib/types' import type { DeepPartial } from '@src/lib/types'
import { getInVariableCase } from '@src/lib/utils' import { getInVariableCase } from '@src/lib/utils'
import { IS_NIGHTLY } from '@src/routes/utils' import { IS_STAGING } from '@src/routes/utils'
export async function renameProjectDirectory( export async function renameProjectDirectory(
projectPath: string, projectPath: string,
@ -461,8 +461,8 @@ export async function writeProjectSettingsFile(
// Important for saving settings. // Important for saving settings.
// TODO: should be pulled from electron-builder.yml // TODO: should be pulled from electron-builder.yml
const APP_ID = IS_NIGHTLY const APP_ID = IS_STAGING
? 'dev.zoo.modeling-app-nightly' ? 'dev.zoo.modeling-app-staging'
: 'dev.zoo.modeling-app' : 'dev.zoo.modeling-app'
const getAppFolderName = () => { const getAppFolderName = () => {
@ -470,7 +470,7 @@ const getAppFolderName = () => {
return APP_ID return APP_ID
} }
// TODO: we need to make linux use the same convention this is weird // TODO: we need to make linux use the same convention this is weird
// This variable below gets the -nightly suffix on nightly too thru scripts/flip-files-to-nightly.sh // This variable below gets the -staging suffix on staging too thru scripts/flip-files-to-staging.sh
// But it should be consistent with the reserve domain app id we use on Windows and Linux // But it should be consistent with the reserve domain app id we use on Windows and Linux
return window.electron.packageJson.name return window.electron.packageJson.name
} }

View File

@ -24,7 +24,7 @@ import { Themes } from '@src/lib/theme'
import { reportRejection } from '@src/lib/trap' import { reportRejection } from '@src/lib/trap'
import { isEnumMember } from '@src/lib/types' import { isEnumMember } from '@src/lib/types'
import { capitaliseFC, isArray, toSync } from '@src/lib/utils' import { capitaliseFC, isArray, toSync } from '@src/lib/utils'
import { IS_NIGHTLY_OR_DEBUG } from '@src/routes/utils' import { IS_STAGING_OR_DEBUG } from '@src/routes/utils'
/** /**
* A setting that can be set at the user or project level * A setting that can be set at the user or project level
@ -212,7 +212,7 @@ export function createSettings() {
* Stream resource saving behavior toggle * Stream resource saving behavior toggle
*/ */
streamIdleMode: new Setting<number | undefined>({ streamIdleMode: new Setting<number | undefined>({
defaultValue: IS_NIGHTLY_OR_DEBUG ? 30 * 1000 : 5 * MS_IN_MINUTE, defaultValue: IS_STAGING_OR_DEBUG ? 30 * 1000 : 5 * MS_IN_MINUTE,
hideOnLevel: 'project', hideOnLevel: 'project',
hideOnPlatform: 'both', hideOnPlatform: 'both',
description: 'Save bandwidth & battery', description: 'Save bandwidth & battery',

View File

@ -17,12 +17,12 @@ export const PACKAGE_NAME = isDesktop()
? window.electron.packageJson.name ? window.electron.packageJson.name
: 'zoo-modeling-app' : 'zoo-modeling-app'
export const IS_NIGHTLY = PACKAGE_NAME.indexOf('-nightly') > -1 export const IS_STAGING = PACKAGE_NAME.indexOf('-staging') > -1
export const IS_NIGHTLY_OR_DEBUG = IS_NIGHTLY || APP_VERSION === '0.0.0' export const IS_STAGING_OR_DEBUG = IS_STAGING || APP_VERSION === '0.0.0'
export function getReleaseUrl(version: string = APP_VERSION) { export function getReleaseUrl(version: string = APP_VERSION) {
if (IS_NIGHTLY_OR_DEBUG || version === 'main') { if (IS_STAGING_OR_DEBUG || version === 'main') {
return 'https://github.com/KittyCAD/modeling-app/commits/main' return 'https://github.com/KittyCAD/modeling-app/commits/main'
} }