Add nightly link in about section (#4548)

* Add nightly link in about sectoin

* Add nightly detection

* Lint

* Change APP_NAME to PACKAGE_NAME

* To be improved: working implementation on mac for click to download

* Revert "To be improved: working implementation on mac for click to download"

This reverts commit 7ced32a533.

* Nevermind, will process on the website
This commit is contained in:
Pierre Jacquier
2024-11-25 14:20:50 -05:00
committed by GitHub
parent 00c45114ba
commit 166fa71f7e
3 changed files with 23 additions and 2 deletions

View File

@ -5,7 +5,8 @@ export COMMIT=$(git rev-parse --short HEAD)
# package.json
yarn files:set-version
echo "$(jq --arg name 'Zoo Modeling App (Nightly)' '.productName=$name' package.json --indent 2)" > package.json
PACKAGE=$(jq '.productName="Zoo Modeling App (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

View File

@ -13,7 +13,7 @@ import { isDesktop } from 'lib/isDesktop'
import { ActionButton } from 'components/ActionButton'
import { SettingsFieldInput } from './SettingsFieldInput'
import toast from 'react-hot-toast'
import { APP_VERSION } from 'routes/Settings'
import { APP_VERSION, PACKAGE_NAME } from 'routes/Settings'
import { PATHS } from 'lib/paths'
import {
createAndOpenNewTutorialProject,
@ -264,6 +264,22 @@ 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>
{PACKAGE_NAME.indexOf('-nightly') === -1 && (
<p className="max-w-2xl mt-6">
Want to experience the latest and (hopefully) greatest from our
main development branch?{' '}
<a
href="https://zoo.dev/modeling-app/download/nightly"
target="_blank"
rel="noopener noreferrer"
>
Click here to grab Zoo Modeling App (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>

View File

@ -26,6 +26,10 @@ export const APP_VERSION =
window.electron.packageJson.version
: 'main'
export const PACKAGE_NAME = isDesktop()
? window.electron.packageJson.name
: 'zoo-modeling-app'
export const Settings = () => {
const navigate = useNavigate()
const [searchParams, setSearchParams] = useSearchParams()