Compare commits
8 Commits
api-deux-p
...
pierremtb/
Author | SHA1 | Date | |
---|---|---|---|
7ddea61953 | |||
3a5df99af8 | |||
bcab005098 | |||
4902eb08fc | |||
479a6de9cb | |||
8581085e92 | |||
5bc18a01e0 | |||
24c46c70fe |
68
.github/workflows/build-apps.yml
vendored
68
.github/workflows/build-apps.yml
vendored
@ -7,11 +7,10 @@ on:
|
||||
- main
|
||||
tags:
|
||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||
- 'nightly-v[0-9]+.[0-9]+.[0-9]+'
|
||||
|
||||
env:
|
||||
IS_RELEASE: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
|
||||
IS_NIGHTLY: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'nightly-v') }}
|
||||
IS_STAGING: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
@ -92,12 +91,16 @@ jobs:
|
||||
if: ${{ steps.wasm.outputs.should-build-wasm == 'true' }}
|
||||
run: "npm run build:wasm"
|
||||
|
||||
- name: Set nightly version, product name, release notes, and icons
|
||||
if: ${{ env.IS_NIGHTLY == 'true' }}
|
||||
- name: Set staging version, product name, release notes, and icons
|
||||
if: ${{ env.IS_STAGING == 'true' }}
|
||||
run: |
|
||||
export VERSION=${GITHUB_REF_NAME#nightly-v}
|
||||
COMMIT=$(git rev-parse --short HEAD)
|
||||
DATE=$(date +'%-y.%-m.%-d')
|
||||
# TODO: add commit count today on main
|
||||
OFFSET=$(date +'%H%M')
|
||||
export VERSION=$DATE-staging.$OFFSET+$COMMIT
|
||||
npm run files:set-version
|
||||
npm run files:flip-to-nightly
|
||||
npm run files:flip-to-staging
|
||||
|
||||
- name: Set release version
|
||||
if: ${{ env.IS_RELEASE == 'true' }}
|
||||
@ -117,7 +120,7 @@ jobs:
|
||||
assets/icon.png
|
||||
|
||||
- id: export_version
|
||||
run: echo "version=`cat package.json | jq -r '.version'`" >> "$GITHUB_OUTPUT"
|
||||
run: echo "version=`cat package.json | jq -r '.version' | cut -f1 -d"+"`" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- id: export_notes
|
||||
run: echo "notes=`cat release-notes.md`" >> "$GITHUB_OUTPUT"
|
||||
@ -177,7 +180,7 @@ jobs:
|
||||
- run: npm install
|
||||
|
||||
- name: Prepare certificate and variables (Windows only)
|
||||
if: ${{ (env.IS_RELEASE == 'true' || env.IS_NIGHTLY == 'true') && matrix.os == 'windows-2022' }}
|
||||
if: ${{ (env.IS_RELEASE == 'true' || env.IS_STAGING == 'true') && matrix.os == 'windows-2022' }}
|
||||
run: |
|
||||
echo "${{secrets.SM_CLIENT_CERT_FILE_B64 }}" | base64 --decode > /d/Certificate_pkcs12.p12
|
||||
cat /d/Certificate_pkcs12.p12
|
||||
@ -192,7 +195,7 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
- name: Setup certicate with SSM KSP (Windows only)
|
||||
if: ${{ (env.IS_RELEASE == 'true' || env.IS_NIGHTLY == 'true') && matrix.os == 'windows-2022' }}
|
||||
if: ${{ (env.IS_RELEASE == 'true' || env.IS_STAGING == 'true') && matrix.os == 'windows-2022' }}
|
||||
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
|
||||
msiexec /i smtools-windows-x64.msi /quiet /qn
|
||||
@ -201,22 +204,17 @@ jobs:
|
||||
C:\Windows\System32\certutil.exe -csp "DigiCert Signing Manager KSP" -key -user
|
||||
smksp_cert_sync.exe
|
||||
smctl windows certsync
|
||||
# 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,
|
||||
# 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
|
||||
# seems to be doing that extra sync that we need for scripts/sign-win.js to work.
|
||||
# TODO: we still need to make sign-win.js errors fail the workflow, see issue #6276
|
||||
shell: cmd
|
||||
|
||||
- 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,
|
||||
# this is just not doing any codesign or release yml generation, and points to dev infra
|
||||
run: npm run tronb:package:dev
|
||||
|
||||
- name: Build the app (release)
|
||||
if: ${{ env.IS_RELEASE == 'true' || env.IS_NIGHTLY == 'true' }}
|
||||
if: ${{ env.IS_RELEASE == 'true' || env.IS_STAGING == 'true' }}
|
||||
env:
|
||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
||||
@ -226,7 +224,7 @@ jobs:
|
||||
CSC_KEY_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
||||
CSC_KEYCHAIN: ${{ secrets.APPLE_SIGNING_IDENTITY }}
|
||||
WINDOWS_CERTIFICATE_THUMBPRINT: ${{ secrets.WINDOWS_CERTIFICATE_THUMBPRINT }}
|
||||
run: npm run tronb:package:prod
|
||||
run: npm run tronb:package:${{ env.IS_RELEASE == 'true' && 'prod' || 'dev' }}
|
||||
|
||||
- name: List artifacts in out/
|
||||
run: ls -R out
|
||||
@ -250,13 +248,13 @@ jobs:
|
||||
out/*-x86_64-linux.*
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: ${{ env.IS_RELEASE == 'true' || env.IS_NIGHTLY == 'true' }}
|
||||
if: ${{ env.IS_RELEASE == 'true' || env.IS_STAGING == 'true' }}
|
||||
with:
|
||||
name: out-yml-${{ matrix.platform }}
|
||||
path: |
|
||||
out/latest*.yml
|
||||
|
||||
# TODO: add the 'Build for Mac TestFlight (nightly)' stage back
|
||||
# TODO: add the 'Build for Mac TestFlight' stage back
|
||||
|
||||
# The steps below are for updater-test builds, only on release
|
||||
|
||||
@ -306,7 +304,8 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
contents: write
|
||||
if: ${{ github.ref_type == 'tag' }}
|
||||
# Equivalent to IS_RELEASE || IS_STAGING (but we can't access those env vars here)
|
||||
if: ${{ github.ref_type == 'tag' || (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
|
||||
env:
|
||||
VERSION_NO_V: ${{ needs.prepare-files.outputs.version }}
|
||||
VERSION: ${{ format('v{0}', needs.prepare-files.outputs.version) }}
|
||||
@ -363,8 +362,8 @@ jobs:
|
||||
env:
|
||||
NOTES: ${{ needs.prepare-files.outputs.notes }}
|
||||
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' }}
|
||||
URL_CODED_NAME: ${{ env.IS_NIGHTLY == 'true' && 'Zoo%20Design%20Studio%20%28Nightly%29' || 'Zoo%20Design%20Studio' }}
|
||||
WEBSITE_DIR: ${{ env.IS_STAGING == 'true' && 'dl.zoo.dev/releases/modeling-app/staging' || 'dl.zoo.dev/releases/modeling-app' }}
|
||||
URL_CODED_NAME: ${{ env.IS_STAGING == 'true' && 'Zoo%20Design%20Studio%20%28Staging%29' || 'Zoo%20Design%20Studio' }}
|
||||
run: |
|
||||
RELEASE_DIR=https://${WEBSITE_DIR}
|
||||
jq --null-input \
|
||||
@ -412,38 +411,27 @@ jobs:
|
||||
- name: List artifacts
|
||||
run: "ls -R out"
|
||||
|
||||
- name: Set more complete nightly release notes
|
||||
if: ${{ env.IS_NIGHTLY == 'true' }}
|
||||
run: |
|
||||
# Note: preferred going this way instead of a full clone in the checkout step,
|
||||
# see https://github.com/actions/checkout/issues/1471
|
||||
git fetch --prune --unshallow --tags
|
||||
export TAG="nightly-${VERSION}"
|
||||
export PREVIOUS_TAG=$(git tag --list --sort=-committerdate "nightly-v[0-9]*" | head -n2 | tail -n1)
|
||||
export NOTES=$(./scripts/get-nightly-changelog.sh)
|
||||
npm run files:set-notes
|
||||
|
||||
- name: Authenticate to Google Cloud
|
||||
if: ${{ env.IS_NIGHTLY == 'true' }}
|
||||
if: ${{ env.IS_STAGING == 'true' }}
|
||||
uses: 'google-github-actions/auth@v2.1.8'
|
||||
with:
|
||||
credentials_json: '${{ secrets.GOOGLE_CLOUD_DL_SA }}'
|
||||
|
||||
- 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
|
||||
with:
|
||||
project_id: ${{ env.GOOGLE_CLOUD_PROJECT_ID }}
|
||||
|
||||
- name: Upload nightly files to public bucket
|
||||
if: ${{ env.IS_NIGHTLY == 'true' }}
|
||||
- name: Upload staging files to public bucket
|
||||
if: ${{ env.IS_STAGING == 'true' }}
|
||||
uses: google-github-actions/upload-cloud-storage@v2.2.2
|
||||
with:
|
||||
path: out
|
||||
glob: '*'
|
||||
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
|
||||
if: ${{ env.IS_NIGHTLY == 'true' }}
|
||||
run: npm run files:invalidate-bucket:nightly
|
||||
if: ${{ env.IS_STAGING == 'true' }}
|
||||
run: npm run files:invalidate-bucket:staging
|
||||
|
39
.github/workflows/tag-nightly.yml
vendored
39
.github/workflows/tag-nightly.yml
vendored
@ -1,39 +0,0 @@
|
||||
name: tag-nightly
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 4 * * *'
|
||||
# Daily at 04:00 AM UTC
|
||||
# Will checkout the last commit from the default branch (main as of 2023-10-04)
|
||||
|
||||
jobs:
|
||||
tag-nightly:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/create-github-app-token@v1
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ secrets.MODELING_APP_GH_APP_ID }}
|
||||
private-key: ${{ secrets.MODELING_APP_GH_APP_PRIVATE_KEY }}
|
||||
owner: ${{ github.repository_owner }}
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ steps.app-token.outputs.token }}
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- run: npm install
|
||||
|
||||
- name: Push tag
|
||||
run: |
|
||||
VERSION_NO_V=$(date +'%-y.%-m.%-d')
|
||||
TAG="nightly-v$VERSION_NO_V"
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git tag $TAG
|
||||
git push origin tag $TAG
|
@ -42,8 +42,6 @@ The 3D view in Design Studio is just a video stream from our hosted geometry eng
|
||||
|
||||
We recommend downloading the latest application binary from our [releases](https://github.com/KittyCAD/modeling-app/releases) page. If you don't see your platform or architecture supported there, please file an issue.
|
||||
|
||||
If you'd like to try out upcoming changes sooner, you can also download those from our [nightly releases](https://zoo.dev/modeling-app/download/nightly) page.
|
||||
|
||||
## Developing
|
||||
|
||||
Finally, if you'd like to run a development build or contribute to the project, please visit our [contributor guide](CONTRIBUTING.md) to get started.
|
||||
|
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 119 KiB |
Before Width: | Height: | Size: 259 KiB After Width: | Height: | Size: 259 KiB |
@ -117,10 +117,10 @@
|
||||
"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-notes": "./scripts/set-files-notes.sh",
|
||||
"files:flip-to-nightly": "./scripts/flip-files-to-nightly.sh",
|
||||
"files:flip-to-nightly:windows": "powershell -ExecutionPolicy Bypass -File ./scripts/flip-files-to-nightly.ps1",
|
||||
"files:flip-to-staging": "./scripts/flip-files-to-staging.sh",
|
||||
"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:nightly": "./scripts/invalidate-files-bucket.sh --nightly",
|
||||
"files:invalidate-bucket:staging": "./scripts/invalidate-files-bucket.sh --staging",
|
||||
"postinstall": "electron-rebuild",
|
||||
"generate:machine-api": "npx openapi-typescript ./openapi/machine-api.json -o src/lib/machine-api.d.ts",
|
||||
"generate:samples-manifest": "cd public/kcl-samples && node generate-manifest.js",
|
||||
|
@ -42,7 +42,7 @@ impl Build {
|
||||
.to_string();
|
||||
|
||||
if !stable {
|
||||
version = format!("{}-nightly", version);
|
||||
version = format!("{}-staging", version);
|
||||
}
|
||||
|
||||
let release_tag = if stable {
|
||||
@ -53,7 +53,7 @@ impl Build {
|
||||
.replace("refs/tags/", "")
|
||||
.to_string()
|
||||
} else {
|
||||
"nightly".to_string()
|
||||
"staging".to_string()
|
||||
};
|
||||
|
||||
if stable && !release_tag.contains(&version) {
|
||||
|
@ -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
|
@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
export COMMIT=$(git rev-parse --short HEAD)
|
||||
|
||||
# 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 "Nightly build (commit $COMMIT)" > release-notes.md
|
||||
|
||||
# icons
|
||||
cp assets/icon-nightly.png assets/icon.png
|
||||
cp assets/icon-nightly.ico assets/icon.ico
|
20
scripts/flip-files-to-staging.ps1
Normal file
20
scripts/flip-files-to-staging.ps1
Normal file
@ -0,0 +1,20 @@
|
||||
$COMMIT=$(git rev-parse --short HEAD)
|
||||
$VERSION=$(Get-Date -Format "yy.M.d-staging.1-$COMMIT")
|
||||
$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
|
19
scripts/flip-files-to-staging.sh
Executable file
19
scripts/flip-files-to-staging.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
export COMMIT=$(git rev-parse --short HEAD)
|
||||
|
||||
# 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 "Staging build (commit $COMMIT)" > release-notes.md
|
||||
|
||||
# icons
|
||||
cp assets/icon-staging.png assets/icon.png
|
||||
cp assets/icon-staging.ico assets/icon.ico
|
@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
echo "## What's Changed"
|
||||
git log ${PREVIOUS_TAG}..HEAD --oneline --pretty=format:%s | grep -v Bump | awk '{print "* "toupper(substr($0,0,1))substr($0,2)}'
|
||||
echo ""
|
||||
echo "**Full Changelog**: https://github.com/KittyCAD/modeling-app/compare/${PREVIOUS_TAG}...${TAG}"
|
@ -1,8 +1,8 @@
|
||||
!macro preInit
|
||||
SetRegView 64
|
||||
WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Program Files\Zoo Design Studio (Nightly)"
|
||||
WriteRegExpandStr HKCU "${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 (Staging)"
|
||||
SetRegView 32
|
||||
WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Program Files\Zoo Design Studio (Nightly)"
|
||||
WriteRegExpandStr HKCU "${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 (Staging)"
|
||||
!macroend
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
base_dir="/releases/modeling-app"
|
||||
if [[ $1 = "--nightly" ]]; then
|
||||
base_dir="/releases/modeling-app/nightly"
|
||||
if [[ $1 = "--staging" ]]; then
|
||||
base_dir="/releases/modeling-app/staging"
|
||||
fi
|
||||
|
||||
echo "Invalidating json and yml files at $base_dir in the download bucket"
|
||||
|
@ -30,7 +30,7 @@ import {
|
||||
settingsActor,
|
||||
useSettings,
|
||||
} from '@src/lib/singletons'
|
||||
import { APP_VERSION, IS_NIGHTLY, getReleaseUrl } from '@src/routes/utils'
|
||||
import { APP_VERSION, getReleaseUrl } from '@src/routes/utils'
|
||||
import {
|
||||
acceptOnboarding,
|
||||
catchOnboardingWarnError,
|
||||
@ -276,25 +276,6 @@ export const AllSettingsFields = forwardRef(
|
||||
, and start a discussion if you don't see it! Your feedback will
|
||||
help us prioritize what to build next.
|
||||
</p>
|
||||
{!IS_NIGHTLY && (
|
||||
<p className="max-w-2xl mt-6">
|
||||
Want to experience the latest and (hopefully) greatest from our
|
||||
main development branch?{' '}
|
||||
<a
|
||||
onClick={openExternalBrowserIfDesktop(
|
||||
'https://zoo.dev/modeling-app/download/nightly'
|
||||
)}
|
||||
href="https://zoo.dev/modeling-app/download/nightly"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Click here to grab Zoo Design Studio (Nightly)
|
||||
</a>
|
||||
. It can be installed side-by-side with the stable version
|
||||
you're running now. But careful there, a lot less testing is
|
||||
involved in their release 🤖.
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -16,7 +16,7 @@ import type {
|
||||
StateMachineCommandSetSchema,
|
||||
} from '@src/lib/commandTypes'
|
||||
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<
|
||||
T extends AnyStateMachine,
|
||||
@ -86,7 +86,7 @@ export function createMachineCommand<
|
||||
} else if ('status' in commandConfig) {
|
||||
const { status } = commandConfig
|
||||
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
|
||||
|
@ -25,7 +25,7 @@ import type { FileEntry, FileMetadata, Project } from '@src/lib/project'
|
||||
import { err } from '@src/lib/trap'
|
||||
import type { DeepPartial } from '@src/lib/types'
|
||||
import { getInVariableCase } from '@src/lib/utils'
|
||||
import { IS_NIGHTLY } from '@src/routes/utils'
|
||||
import { IS_STAGING } from '@src/routes/utils'
|
||||
|
||||
export async function renameProjectDirectory(
|
||||
projectPath: string,
|
||||
@ -461,8 +461,8 @@ export async function writeProjectSettingsFile(
|
||||
|
||||
// Important for saving settings.
|
||||
// TODO: should be pulled from electron-builder.yml
|
||||
const APP_ID = IS_NIGHTLY
|
||||
? 'dev.zoo.modeling-app-nightly'
|
||||
const APP_ID = IS_STAGING
|
||||
? 'dev.zoo.modeling-app-staging'
|
||||
: 'dev.zoo.modeling-app'
|
||||
|
||||
const getAppFolderName = () => {
|
||||
@ -470,7 +470,7 @@ const getAppFolderName = () => {
|
||||
return APP_ID
|
||||
}
|
||||
// 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
|
||||
return window.electron.packageJson.name
|
||||
}
|
||||
|
@ -469,9 +469,9 @@ function OnboardingConclusion() {
|
||||
We highly encourage you to{' '}
|
||||
<a
|
||||
onClick={openExternalBrowserIfDesktop(
|
||||
`${VITE_KC_SITE_BASE_URL}/modeling-app/download/nightly`
|
||||
`${VITE_KC_SITE_BASE_URL}/modeling-app/download`
|
||||
)}
|
||||
href="https://zoo.dev/modeling-app/download/nightly"
|
||||
href="https://zoo.dev/modeling-app/download"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
|
@ -15,7 +15,7 @@ import { Themes, getSystemTheme } from '@src/lib/theme'
|
||||
import { reportRejection } from '@src/lib/trap'
|
||||
import { toSync } from '@src/lib/utils'
|
||||
import { authActor, useSettings } from '@src/lib/singletons'
|
||||
import { APP_VERSION, IS_NIGHTLY } from '@src/routes/utils'
|
||||
import { APP_VERSION } from '@src/routes/utils'
|
||||
|
||||
const subtleBorder =
|
||||
'border border-solid border-chalkboard-30 dark:border-chalkboard-80'
|
||||
@ -106,7 +106,7 @@ const SignIn = () => {
|
||||
<Logo className="text-primary h-10 lg:h-12 xl:h-16 relative translate-y-1 mr-4 lg:mr-6 xl:mr-8" />
|
||||
<h1 className="text-3xl lg:text-4xl xl:text-5xl">{APP_NAME}</h1>
|
||||
<span className="px-3 py-1 text-base rounded-full bg-primary/10 text-primary self-start">
|
||||
{IS_NIGHTLY ? 'nightly' : ''} v{APP_VERSION}
|
||||
v{APP_VERSION}
|
||||
</span>
|
||||
</div>
|
||||
<p className="my-4 text-lg xl:text-xl">
|
||||
|
@ -16,13 +16,14 @@ export const PACKAGE_NAME = isDesktop()
|
||||
? window.electron.packageJson.name
|
||||
: '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' || APP_VERSION === '11.22.33'
|
||||
export const IS_STAGING_OR_DEBUG =
|
||||
IS_STAGING || APP_VERSION === '0.0.0' || APP_VERSION === '11.22.33'
|
||||
|
||||
export function getReleaseUrl(version: string = APP_VERSION) {
|
||||
// TODO: fix for staging and point to commit instead of release
|
||||
return `https://github.com/KittyCAD/modeling-app/releases/tag/${
|
||||
IS_NIGHTLY ? 'nightly-' : ''
|
||||
IS_STAGING ? 'staging-' : ''
|
||||
}v${version}`
|
||||
}
|
||||
|
Reference in New Issue
Block a user