@kunver/new 2.3.2 → 2.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -3
- package/dist/templates/electron-svelte/.prettierignore +6 -0
- package/dist/templates/electron-svelte/.prettierrc.yaml +13 -0
- package/dist/templates/electron-svelte/.vscode/launch.json +39 -0
- package/dist/templates/electron-svelte/.vscode/settings.json +15 -0
- package/dist/templates/electron-svelte/README.md +3 -0
- package/dist/templates/electron-svelte/build/entitlements.mac.plist +12 -0
- package/dist/templates/electron-svelte/build/icon.icns +0 -0
- package/dist/templates/electron-svelte/build/icon.ico +0 -0
- package/dist/templates/electron-svelte/build/icon.png +0 -0
- package/dist/templates/electron-svelte/bun.lock +1154 -0
- package/dist/templates/electron-svelte/electron-builder.yml +44 -0
- package/dist/templates/electron-svelte/electron.vite.config.ts +15 -0
- package/dist/templates/electron-svelte/manager.cjs +69 -0
- package/dist/templates/electron-svelte/package.json +44 -0
- package/dist/templates/electron-svelte/resources/icon.png +0 -0
- package/dist/templates/electron-svelte/src/main/index.ts +62 -0
- package/dist/templates/electron-svelte/src/preload/index.d.ts +8 -0
- package/dist/templates/electron-svelte/src/preload/index.ts +22 -0
- package/dist/templates/electron-svelte/src/renderer/index.html +16 -0
- package/dist/templates/electron-svelte/src/renderer/src/App.svelte +8 -0
- package/dist/templates/electron-svelte/src/renderer/src/assets/main.css +1 -0
- package/dist/templates/electron-svelte/src/renderer/src/env.d.ts +2 -0
- package/dist/templates/electron-svelte/src/renderer/src/main.ts +11 -0
- package/dist/templates/electron-svelte/svelte.config.mjs +7 -0
- package/dist/templates/electron-svelte/tsconfig.json +4 -0
- package/dist/templates/electron-svelte/tsconfig.node.json +11 -0
- package/dist/templates/electron-svelte/tsconfig.web.json +17 -0
- package/dist/templates/react-ts-tw/package.json +2 -3
- package/package.json +39 -39
- package/dist/templates/react-ts-tw/push.sh +0 -30
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
appId: com.electron.app
|
|
2
|
+
productName: electron-vite
|
|
3
|
+
directories:
|
|
4
|
+
buildResources: build
|
|
5
|
+
files:
|
|
6
|
+
- '!**/.vscode/*'
|
|
7
|
+
- '!src/*'
|
|
8
|
+
- '!electron.vite.config.{js,ts,mjs,cjs}'
|
|
9
|
+
- '!svelte.config.mjs'
|
|
10
|
+
- '!{.eslintcache,eslint.config.mjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}'
|
|
11
|
+
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
|
|
12
|
+
- '!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}'
|
|
13
|
+
asarUnpack:
|
|
14
|
+
- resources/**
|
|
15
|
+
win:
|
|
16
|
+
executableName: electron-vite
|
|
17
|
+
nsis:
|
|
18
|
+
artifactName: ${name}-${version}-setup.${ext}
|
|
19
|
+
shortcutName: ${productName}
|
|
20
|
+
uninstallDisplayName: ${productName}
|
|
21
|
+
createDesktopShortcut: always
|
|
22
|
+
mac:
|
|
23
|
+
entitlementsInherit: build/entitlements.mac.plist
|
|
24
|
+
extendInfo:
|
|
25
|
+
- NSCameraUsageDescription: Application requests access to the device's camera.
|
|
26
|
+
- NSMicrophoneUsageDescription: Application requests access to the device's microphone.
|
|
27
|
+
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder.
|
|
28
|
+
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
|
|
29
|
+
notarize: false
|
|
30
|
+
dmg:
|
|
31
|
+
artifactName: ${name}-${version}.${ext}
|
|
32
|
+
linux:
|
|
33
|
+
target:
|
|
34
|
+
- AppImage
|
|
35
|
+
- snap
|
|
36
|
+
- deb
|
|
37
|
+
maintainer: electronjs.org
|
|
38
|
+
category: Utility
|
|
39
|
+
appImage:
|
|
40
|
+
artifactName: ${name}-${version}.${ext}
|
|
41
|
+
npmRebuild: false
|
|
42
|
+
publish:
|
|
43
|
+
provider: generic
|
|
44
|
+
url: https://example.com/auto-updates
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
|
|
2
|
+
import { svelte } from '@sveltejs/vite-plugin-svelte'
|
|
3
|
+
import tailwindcss from '@tailwindcss/vite'
|
|
4
|
+
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
main: {
|
|
7
|
+
plugins: [externalizeDepsPlugin()],
|
|
8
|
+
},
|
|
9
|
+
preload: {
|
|
10
|
+
plugins: [externalizeDepsPlugin()],
|
|
11
|
+
},
|
|
12
|
+
renderer: {
|
|
13
|
+
plugins: [svelte(), tailwindcss()],
|
|
14
|
+
},
|
|
15
|
+
})
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
const { exec } = require("child_process")
|
|
2
|
+
|
|
3
|
+
function runCommand(command) {
|
|
4
|
+
return new Promise((resolve, reject) => {
|
|
5
|
+
exec(command, { shell: true }, (error, stdout, stderr) => {
|
|
6
|
+
if (error) {
|
|
7
|
+
console.log(`❌ Error occurred: ${error.message}`)
|
|
8
|
+
if (stderr) {
|
|
9
|
+
console.log(`Standard Error: ${stderr.trim()}`)
|
|
10
|
+
}
|
|
11
|
+
return resolve(false)
|
|
12
|
+
}
|
|
13
|
+
if (stdout) {
|
|
14
|
+
console.log(stdout.trim())
|
|
15
|
+
}
|
|
16
|
+
resolve(true)
|
|
17
|
+
})
|
|
18
|
+
})
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
async function publishAndPushOperations(packageManager, command) {
|
|
22
|
+
console.log("Switching to main branch...")
|
|
23
|
+
if (!await runCommand("git checkout main")) {
|
|
24
|
+
process.exit(1)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
console.log("Merging dev branch into main...")
|
|
28
|
+
if (!await runCommand("git merge dev")) {
|
|
29
|
+
console.log("❌ Merge conflict occurred. Please resolve it manually.")
|
|
30
|
+
process.exit(1)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
console.log("Pushing changes to GitHub...")
|
|
34
|
+
if (!await runCommand("git push origin main")) {
|
|
35
|
+
console.log("❌ Failed to push changes to GitHub. Please check your network connection and permissions.")
|
|
36
|
+
process.exit(1)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
console.log("✅ Successfully merged 'dev' into 'main' and pushed to GitHub!")
|
|
40
|
+
|
|
41
|
+
if (command === "publish") {
|
|
42
|
+
console.log(`Publishing package (${packageManager} publish)...`)
|
|
43
|
+
if (!await runCommand(`${packageManager} publish`)) {
|
|
44
|
+
console.log(`❌ ${packageManager} publish command failed.`)
|
|
45
|
+
process.exit(1)
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
console.log("Switching back to dev branch...")
|
|
50
|
+
if (!await runCommand("git checkout dev")) {
|
|
51
|
+
console.log("❌ Failed to switch back to the 'dev' branch.")
|
|
52
|
+
process.exit(1)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
console.log("✅ All operations completed.")
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const packageManagerArg = process.argv[2]
|
|
59
|
+
const commandArg = process.argv[3]
|
|
60
|
+
|
|
61
|
+
const validManagers = ["pnpm", "npm", "yarn", "bun"]
|
|
62
|
+
const validCommands = ["push", "publish"]
|
|
63
|
+
|
|
64
|
+
if (!validManagers.includes(packageManagerArg) || !validCommands.includes(commandArg)) {
|
|
65
|
+
console.log(`Invalid or missing arguments. Usage: node manager.cjs <package-manager> <push|publish>\nValid package managers: ${validManagers.join(", ")}`)
|
|
66
|
+
process.exit(1)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
publishAndPushOperations(packageManagerArg, commandArg)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "electron-vite",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "An Electron application with Svelte and TypeScript",
|
|
5
|
+
"main": "./out/main/index.js",
|
|
6
|
+
"author": "burak unver",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"format": "prettier --plugin prettier-plugin-svelte --write .",
|
|
9
|
+
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",
|
|
10
|
+
"svelte-check": "svelte-check --tsconfig ./tsconfig.json",
|
|
11
|
+
"typecheck": "npm run typecheck:node && npm run svelte-check",
|
|
12
|
+
"start": "electron-vite preview",
|
|
13
|
+
"dev": "electron-vite dev",
|
|
14
|
+
"build": "npm run typecheck && electron-vite build",
|
|
15
|
+
"postinstall": "electron-builder install-app-deps",
|
|
16
|
+
"build:unpack": "npm run build && electron-builder --dir",
|
|
17
|
+
"build:win": "npm run build && electron-builder --win",
|
|
18
|
+
"build:mac": "npm run build && electron-builder --mac",
|
|
19
|
+
"build:linux": "npm run build && electron-builder --linux"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@electron-toolkit/preload": "^3.0.2",
|
|
23
|
+
"@electron-toolkit/utils": "^4.0.0",
|
|
24
|
+
"@tailwindcss/vite": "^4.1.12",
|
|
25
|
+
"tailwindcss": "^4.1.12"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@electron-toolkit/tsconfig": "^1.0.1",
|
|
29
|
+
"@sveltejs/vite-plugin-svelte": "^6.1.0",
|
|
30
|
+
"@types/node": "^22.16.5",
|
|
31
|
+
"electron": "^37.2.3",
|
|
32
|
+
"electron-builder": "^25.1.8",
|
|
33
|
+
"electron-vite": "^4.0.0",
|
|
34
|
+
"prettier": "^3.6.2",
|
|
35
|
+
"prettier-plugin-svelte": "^3.4.0",
|
|
36
|
+
"svelte": "^5.36.10",
|
|
37
|
+
"svelte-check": "^4.3.0",
|
|
38
|
+
"typescript": "^5.8.3",
|
|
39
|
+
"vite": "^7.0.5"
|
|
40
|
+
},
|
|
41
|
+
"trustedDependencies": [
|
|
42
|
+
"@tailwindcss/oxide"
|
|
43
|
+
]
|
|
44
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { app, shell, BrowserWindow, ipcMain } from 'electron'
|
|
2
|
+
import { join } from 'path'
|
|
3
|
+
import { electronApp, optimizer, is } from '@electron-toolkit/utils'
|
|
4
|
+
import icon from '../../resources/icon.png?asset'
|
|
5
|
+
|
|
6
|
+
function createWindow(): void {
|
|
7
|
+
// Create the browser window.
|
|
8
|
+
const mainWindow = new BrowserWindow({
|
|
9
|
+
width: 900,
|
|
10
|
+
height: 670,
|
|
11
|
+
show: false,
|
|
12
|
+
autoHideMenuBar: true,
|
|
13
|
+
...(process.platform === 'linux' ? { icon } : {}),
|
|
14
|
+
webPreferences: {
|
|
15
|
+
preload: join(__dirname, '../preload/index.js'),
|
|
16
|
+
sandbox: false,
|
|
17
|
+
},
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
mainWindow.on('ready-to-show', () => {
|
|
21
|
+
mainWindow.show()
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
mainWindow.webContents.setWindowOpenHandler(details => {
|
|
25
|
+
shell.openExternal(details.url)
|
|
26
|
+
return { action: 'deny' }
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
if (is.dev && process.env['ELECTRON_RENDERER_URL']) {
|
|
30
|
+
mainWindow.loadURL(process.env['ELECTRON_RENDERER_URL'])
|
|
31
|
+
} else {
|
|
32
|
+
mainWindow.loadFile(join(__dirname, '../renderer/index.html'))
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
app.whenReady().then(() => {
|
|
37
|
+
electronApp.setAppUserModelId('com.electron')
|
|
38
|
+
|
|
39
|
+
app.on('browser-window-created', (_, window) => {
|
|
40
|
+
optimizer.watchWindowShortcuts(window)
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
ipcMain.on('ping', () => console.log('pong'))
|
|
44
|
+
|
|
45
|
+
createWindow()
|
|
46
|
+
|
|
47
|
+
app.on('activate', function () {
|
|
48
|
+
if (BrowserWindow.getAllWindows().length === 0) createWindow()
|
|
49
|
+
})
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
app.on('window-all-closed', () => {
|
|
53
|
+
if (process.platform !== 'darwin') {
|
|
54
|
+
app.quit()
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
app.on('window-all-closed', () => {
|
|
59
|
+
if (process.platform !== 'darwin') {
|
|
60
|
+
app.quit()
|
|
61
|
+
}
|
|
62
|
+
})
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { contextBridge } from 'electron'
|
|
2
|
+
import { electronAPI } from '@electron-toolkit/preload'
|
|
3
|
+
|
|
4
|
+
// Custom APIs for renderer
|
|
5
|
+
const api = {}
|
|
6
|
+
|
|
7
|
+
// Use `contextBridge` APIs to expose Electron APIs to
|
|
8
|
+
// renderer only if context isolation is enabled, otherwise
|
|
9
|
+
// just add to the DOM global.
|
|
10
|
+
if (process.contextIsolated) {
|
|
11
|
+
try {
|
|
12
|
+
contextBridge.exposeInMainWorld('electron', electronAPI)
|
|
13
|
+
contextBridge.exposeInMainWorld('api', api)
|
|
14
|
+
} catch (error) {
|
|
15
|
+
console.error(error)
|
|
16
|
+
}
|
|
17
|
+
} else {
|
|
18
|
+
// @ts-ignore (define in dts)
|
|
19
|
+
window.electron = electronAPI
|
|
20
|
+
// @ts-ignore (define in dts)
|
|
21
|
+
window.api = api
|
|
22
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<title>Electron</title>
|
|
6
|
+
<meta
|
|
7
|
+
http-equiv="Content-Security-Policy"
|
|
8
|
+
content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:"
|
|
9
|
+
/>
|
|
10
|
+
</head>
|
|
11
|
+
|
|
12
|
+
<body>
|
|
13
|
+
<div id="app"></div>
|
|
14
|
+
<script type="module" src="/src/main.ts"></script>
|
|
15
|
+
</body>
|
|
16
|
+
</html>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
const ipcHandle = (): void => window.electron.ipcRenderer.send('ping')
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<main class="flex flex-col items-center justify-center">
|
|
6
|
+
<h1 class="text-3xl font-bold">Hello World</h1>
|
|
7
|
+
<button class="mt-4 px-4 py-2 bg-blue-500 text-white rounded" onclick={ipcHandle}>Send IPC</button>
|
|
8
|
+
</main>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import 'tailwindcss';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@electron-toolkit/tsconfig/tsconfig.node.json",
|
|
3
|
+
"include": ["electron.vite.config.*", "src/main/**/*", "src/preload/**/*"],
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"composite": true,
|
|
6
|
+
"types": ["electron-vite/node"],
|
|
7
|
+
"moduleResolution": "bundler",
|
|
8
|
+
"module": "ESNext",
|
|
9
|
+
"target": "ESNext"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@electron-toolkit/tsconfig/tsconfig.web.json",
|
|
3
|
+
"include": [
|
|
4
|
+
"src/renderer/src/env.d.ts",
|
|
5
|
+
"src/renderer/src/**/*",
|
|
6
|
+
"src/renderer/src/**/*.svelte",
|
|
7
|
+
"src/preload/*.d.ts"
|
|
8
|
+
],
|
|
9
|
+
"compilerOptions": {
|
|
10
|
+
"verbatimModuleSyntax": true,
|
|
11
|
+
"useDefineForClassFields": true,
|
|
12
|
+
"strict": false,
|
|
13
|
+
"allowJs": true,
|
|
14
|
+
"checkJs": true,
|
|
15
|
+
"lib": ["ESNext", "DOM", "DOM.Iterable"]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"dev": "vite",
|
|
7
|
+
"dev": "bunx --bun vite",
|
|
8
8
|
"build": "tsc -b && vite build",
|
|
9
|
-
"preview": "vite preview"
|
|
10
|
-
"manager": "node manager.js"
|
|
9
|
+
"preview": "vite preview"
|
|
11
10
|
},
|
|
12
11
|
"dependencies": {
|
|
13
12
|
"@tailwindcss/vite": "^4.1.11",
|
package/package.json
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@kunver/new",
|
|
3
|
-
"version": "2.3
|
|
4
|
-
"description": "Opiniated project starter",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"kunver": "dist/index.js"
|
|
8
|
-
},
|
|
9
|
-
"main": "dist/index.js",
|
|
10
|
-
"files": [
|
|
11
|
-
"dist"
|
|
12
|
-
],
|
|
13
|
-
"publishConfig": {
|
|
14
|
-
"access": "public"
|
|
15
|
-
},
|
|
16
|
-
"scripts": {
|
|
17
|
-
"build": "tsup",
|
|
18
|
-
"start": "bun dist/index.js",
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
"@
|
|
29
|
-
"chalk": "^5.6.0",
|
|
30
|
-
"execa": "^9.6.0",
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"@types/node": "^24.3.0",
|
|
36
|
-
"tsup": "^8.5.0",
|
|
37
|
-
"typescript": "^5.9.2"
|
|
38
|
-
}
|
|
39
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@kunver/new",
|
|
3
|
+
"version": "2.4.3",
|
|
4
|
+
"description": "Opiniated project starter",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"kunver": "dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"main": "dist/index.js",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsup",
|
|
18
|
+
"start": "bun dist/index.js",
|
|
19
|
+
"dev": "bun run src/index.ts",
|
|
20
|
+
"prepublishOnly": "bun run build",
|
|
21
|
+
"local": "bun run build && bun link",
|
|
22
|
+
"manager": "bun manager.cjs bun"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [],
|
|
25
|
+
"author": "Burak Unver <burakhanunver@gmail.com> (https://kunver.dev)",
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@inquirer/prompts": "^7.8.3",
|
|
29
|
+
"chalk": "^5.6.0",
|
|
30
|
+
"execa": "^9.6.0",
|
|
31
|
+
"ora": "^8.2.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/bun": "^1.2.20",
|
|
35
|
+
"@types/node": "^24.3.0",
|
|
36
|
+
"tsup": "^8.5.0",
|
|
37
|
+
"typescript": "^5.9.2"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
#!/bin/bash
|
|
3
|
-
|
|
4
|
-
# Exit immediately if a command fails
|
|
5
|
-
set -e
|
|
6
|
-
|
|
7
|
-
# Switch to the main branch
|
|
8
|
-
git checkout main
|
|
9
|
-
|
|
10
|
-
# Merge the dev branch into main
|
|
11
|
-
git merge dev
|
|
12
|
-
if [ $? -ne 0 ]; then
|
|
13
|
-
echo "❌ Merge conflict occurred. Please resolve it manually."
|
|
14
|
-
exit 1
|
|
15
|
-
fi
|
|
16
|
-
|
|
17
|
-
# Push changes to GitHub
|
|
18
|
-
git push origin main
|
|
19
|
-
if [ $? -ne 0 ]; then
|
|
20
|
-
echo "❌ Failed to push changes to GitHub. Please check your network connection and permissions."
|
|
21
|
-
exit 1
|
|
22
|
-
fi
|
|
23
|
-
|
|
24
|
-
echo "✅ Successfully merged 'dev' into 'main' and pushed to GitHub!"
|
|
25
|
-
|
|
26
|
-
git checkout dev
|
|
27
|
-
if [ $? -ne 0 ]; then
|
|
28
|
-
echo "❌ Failed to switch back to the 'dev' branch."
|
|
29
|
-
exit 1
|
|
30
|
-
fi
|