Skip to content

Commit

Permalink
Add nightly link in about section (#4548)
Browse files Browse the repository at this point in the history
* 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 7ced32a.

* Nevermind, will process on the website
  • Loading branch information
pierremtb authored Nov 25, 2024
1 parent 00c4511 commit 166fa71
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
3 changes: 2 additions & 1 deletion scripts/flip-files-to-nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 17 additions & 1 deletion src/components/Settings/AllSettingsFields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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>
Expand Down
4 changes: 4 additions & 0 deletions src/routes/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 166fa71

Please sign in to comment.