Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building and versioning scripts #475

Merged
merged 11 commits into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.yarn
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@

1. Run `yarn` at the top level to install all deps
2. Run `yarn dev` at the top level to start Hedron. This will watch for changes in both `@hedron/desktop` and `@hedron/engine`

## Building for all platforms

Run `yarn dist`. This will go through all checks, builds and then create executables for windows, mac, linux

## Update Hedron version

Run `npx lerna version`. This bumps all versions across packages. While in alpha, we want to choose the "Custom Prerelease" option. This will keep the format of `1.0.0-alpha.x`, where only `x` gets bumped (as major/minor/patch makes no sense).
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "0.0.0"
"version": "1.0.0-alpha.1"
}
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@
"scripts": {
"dev": "lerna run dev --parallel",
"build:engine": "lerna run build --scope @hedron/engine",
"build": "lerna run build",
"typecheck": "lerna run typecheck",
"lint": "lerna run lint",
"format": "prettier --write ."
"format": "prettier . --write",
"dist": "lerna run lint,typecheck,build,dist --sort",
"version": "yarn install && git stage yarn.lock"
},
"devDependencies": {
"@electron-toolkit/eslint-config-prettier": "^2.0.0",
Expand All @@ -29,7 +32,7 @@
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-storybook": "^0.8.0",
"lerna": "^8.1.9",
"prettier": "^3.3.2",
"prettier": "^3.4.2",
"typescript": "^5.5.2"
},
"packageManager": "[email protected]"
Expand Down
16 changes: 10 additions & 6 deletions packages/desktop/electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ asarUnpack:
win:
executableName: hedron-alpha
nsis:
artifactName: ${name}-${version}-setup.${ext}
artifactName: hedron-${version}-setup.${ext}
shortcutName: ${productName}
uninstallDisplayName: ${productName}
createDesktopShortcut: always
Expand All @@ -27,17 +27,21 @@ mac:
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder.
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
notarize: false
target:
- target: 'default'
arch:
- x64
- arm64
dmg:
artifactName: ${name}-${version}.${ext}
artifactName: hedron-${version}-${arch}.${ext}

linux:
executableName: hedron
artifactName: hedron-${version}.${ext}
target:
- AppImage
- snap
- deb
maintainer: electronjs.org
category: Utility
appImage:
artifactName: ${name}-${version}.${ext}
npmRebuild: false
publish:
provider: generic
Expand Down
9 changes: 5 additions & 4 deletions packages/desktop/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hedron/desktop",
"version": "1.0.0",
"version": "1.0.0-alpha.1",
"description": "Visual app using three.js",
"main": "./out/main/index.js",
"scripts": {
Expand All @@ -16,13 +16,14 @@
"build:win": "npm run build && electron-builder --win",
"build:mac": "electron-vite build && electron-builder --mac",
"build:linux": "electron-vite build && electron-builder --linux",
"dist": "electron-vite build && electron-builder -mwl",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
},
"dependencies": {
"@electron-toolkit/preload": "^3.0.1",
"@electron-toolkit/utils": "^3.0.0",
"@hedron/engine": "*",
"@hedron/engine": "^1.0.0-alpha.1",
"@redux-devtools/extension": "^3.3.0",
"@tomjs/electron-devtools-installer": "^2.3.2",
"chokidar": "^4.0.0",
Expand Down Expand Up @@ -60,8 +61,8 @@
"@types/react-dom": "^18.3.0",
"@types/three": "^0.167.2",
"@vitejs/plugin-react": "^4.3.1",
"electron": "31.0.2",
"electron-builder": "^24.13.3",
"electron": "33.2.1",
"electron-builder": "26.0.0-alpha.6",
"electron-vite": "^2.3.0",
"storybook": "^8.2.9",
"vite": "^5.3.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"files": [],
"references": [{ "path": "./tsconfig.node.json" }, { "path": "./tsconfig.web.json" }],
"references": [{ "path": "./tsconfig.node.json" }, { "path": "./tsconfig.web.json" }]
}
2 changes: 1 addition & 1 deletion packages/engine/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hedron/engine",
"version": "0.0.0",
"version": "1.0.0-alpha.1",
"description": "Core functionality for Hedron",
"keywords": [],
"main": "./dist/index.mjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/example-project/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hedron/example-project",
"version": "1.0.0",
"version": "1.0.0-alpha.1",
"dependencies": {
"is-even": "^1.0.0",
"three-stdlib": "^2.34.0"
Expand Down
Loading
Loading