mirror of
https://github.com/chrisbenincasa/tunarr.git
synced 2026-04-18 09:03:35 -04:00
Merge remote-tracking branch 'origin/main' into dev
This commit is contained in:
@@ -168,11 +168,7 @@ jobs:
|
||||
echo "TUNARR_VERSION=${tunarr_version}" >> .env
|
||||
echo "TUNARR_FULL_VERSION=${tunarr_full_version}" >> .env
|
||||
|
||||
if [[ "$TUNARR_EDGE_BUILD" == true ]]; then
|
||||
release_name="Tunarr-${tunarr_version}-${{ matrix.os.target }}"
|
||||
else
|
||||
release_name="Tunarr-${{ matrix.os.target }}"
|
||||
fi
|
||||
release_name="Tunarr-${tunarr_full_version}-${{ matrix.os.target }}"
|
||||
echo "RELEASE_NAME=${release_name}" >> .env
|
||||
|
||||
grep -v '^#.*' .env >> $GITHUB_ENV
|
||||
|
||||
13
.github/workflows/release-it.yml
vendored
13
.github/workflows/release-it.yml
vendored
@@ -3,7 +3,7 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read # for checkout
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
@@ -13,6 +13,11 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: git config
|
||||
run: |
|
||||
git config user.name "${GITHUB_ACTOR}"
|
||||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
||||
|
||||
- name: Use Latest Corepack
|
||||
run: |
|
||||
npm install -g corepack@latest
|
||||
@@ -26,18 +31,18 @@ jobs:
|
||||
cache: "pnpm"
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Release from Main (Stable)
|
||||
if: github.ref == 'refs/heads/main'
|
||||
run: if pnpm run should-semantic-release ; then pnpm release-it --dry-run --ci --verbose ; fi
|
||||
run: if pnpm run should-semantic-release ; then pnpm release-it --ci --verbose ; fi
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
DOCKER_CHANNEL: latest # Updates the 'latest' tag on Docker Hub
|
||||
|
||||
- name: Release from Dev (Pre-release)
|
||||
if: github.ref == 'refs/heads/dev'
|
||||
run: if pnpm run should-semantic-release ; then pnpm release-it --dry-run --verbose --preRelease=dev --ci ; fi
|
||||
run: if pnpm run should-semantic-release ; then pnpm release-it --verbose --preRelease=dev --ci ; fi
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
DOCKER_CHANNEL: dev # Updates the 'dev' tag on Docker Hub
|
||||
|
||||
7
.github/workflows/semantic-release.yml
vendored
7
.github/workflows/semantic-release.yml
vendored
@@ -21,6 +21,10 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: git config
|
||||
run: |
|
||||
git config user.name "${GITHUB_ACTOR}"
|
||||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
||||
- name: Use Latest Corepack
|
||||
run: |
|
||||
npm install -g corepack@latest
|
||||
@@ -36,9 +40,6 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
# - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
|
||||
# run: npm audit signatures
|
||||
|
||||
- name: Release
|
||||
id: semantic
|
||||
uses: chrisbenincasa/semantic-release-action@e0b75dd3b943e75f6bea693cc69caf82c26c0571
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
},
|
||||
"@release-it/bumper": {
|
||||
"out": {
|
||||
"file": "**/package.json",
|
||||
"file": "(server|web|shared|types)/package.json",
|
||||
"path": "version"
|
||||
}
|
||||
}
|
||||
@@ -21,5 +21,8 @@
|
||||
"npm": {
|
||||
"skipChecks": true,
|
||||
"publish": false
|
||||
},
|
||||
"github": {
|
||||
"release": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## [1.0.15](https://github.com/chrisbenincasa/tunarr/compare/v1.0.14...v1.0.15) (2026-01-06)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **macos:** create tunarr data directory on first run if not exists ([a5271b4](https://github.com/chrisbenincasa/tunarr/commit/a5271b46beb6eb2eea66004d41d2b0f147300f60))
|
||||
|
||||
## [1.0.14](https://github.com/chrisbenincasa/tunarr/compare/v1.0.13...v1.0.14) (2026-01-05)
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
@@ -11,18 +11,27 @@ import SwiftUI
|
||||
|
||||
class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
let bundle = Bundle.main
|
||||
let logger = Logger(subsystem: Bundle.main.bundleIdentifier!, category: "Tunarr Subprocess")
|
||||
let logger = Logger(
|
||||
subsystem: Bundle.main.bundleIdentifier!,
|
||||
category: "Tunarr Subprocess"
|
||||
)
|
||||
var task = Process()
|
||||
|
||||
func applicationDidFinishLaunching(_ notification: Notification) {
|
||||
guard let executablePath = Bundle.main.url(forAuxiliaryExecutable: "tunarr-macos")
|
||||
guard
|
||||
let executablePath = Bundle.main.url(
|
||||
forAuxiliaryExecutable: "tunarr-macos"
|
||||
)
|
||||
else {
|
||||
/// TODO: Do a popup here.
|
||||
logger.error("Error: Bundled executable 'tunarr-macos' not found.")
|
||||
return
|
||||
}
|
||||
|
||||
guard let meilisearchPath = Bundle.main.url(forAuxiliaryExecutable: "meilisearch")
|
||||
guard
|
||||
let meilisearchPath = Bundle.main.url(
|
||||
forAuxiliaryExecutable: "meilisearch"
|
||||
)
|
||||
else {
|
||||
logger.error("Error: Bundled executable 'meilisearch' not found")
|
||||
return
|
||||
@@ -31,12 +40,20 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
task.executableURL = executablePath
|
||||
var env = ProcessInfo.processInfo.environment
|
||||
env["TUNARR_MEILISEARCH_PATH"] = meilisearchPath.absoluteURL.path()
|
||||
task.currentDirectoryURL = FileManager.default
|
||||
let tunarrDataDir = FileManager.default
|
||||
.homeDirectoryForCurrentUser
|
||||
.appendingPathComponent(
|
||||
"Library"
|
||||
).appendingPathComponent("Preferences")
|
||||
.appendingPathComponent("tunarr")
|
||||
|
||||
let dirCreateResult = createDirectoryIfNeeded(path: tunarrDataDir)
|
||||
if !dirCreateResult {
|
||||
logger.error("Failure creating or location Tunarr data directory.")
|
||||
return
|
||||
}
|
||||
|
||||
task.currentDirectoryURL = tunarrDataDir
|
||||
task.environment = env
|
||||
logger.info("\(env, privacy: .public)")
|
||||
|
||||
@@ -58,7 +75,9 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
|
||||
logger.info("Successfully started Tunarr subprocess.")
|
||||
} catch {
|
||||
logger.error("Could not launch Tunarr. Reason: \(error, privacy: .public)")
|
||||
logger.error(
|
||||
"Could not launch Tunarr. Reason: \(error, privacy: .public)"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,4 +86,39 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
task.terminate()
|
||||
task.waitUntilExit()
|
||||
}
|
||||
|
||||
func createDirectoryIfNeeded(path: URL) -> Bool {
|
||||
let fileManager = FileManager.default
|
||||
var isDirectory: ObjCBool = false
|
||||
if fileManager.fileExists(
|
||||
atPath: path.path(),
|
||||
isDirectory: &isDirectory
|
||||
) {
|
||||
if isDirectory.boolValue {
|
||||
return true
|
||||
} else {
|
||||
logger.error(
|
||||
"Expected a directory at \(path) but found a file. Delete this file and create a directory with the same name"
|
||||
)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
do {
|
||||
try fileManager.createDirectory(
|
||||
atPath: path.path(),
|
||||
withIntermediateDirectories: true,
|
||||
attributes: nil
|
||||
)
|
||||
logger.debug(
|
||||
"Successfully created Tunarr data directory at \(path.path())"
|
||||
)
|
||||
return true
|
||||
} catch {
|
||||
logger.error(
|
||||
"Error creating Tunarr data directory at \(path.path()): \(error.localizedDescription)"
|
||||
)
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tunarr",
|
||||
"version": "1.0.14",
|
||||
"version": "1.0.15",
|
||||
"description": "Create LiveTV channels from your Plex media",
|
||||
"type": "module",
|
||||
"author": "chrisbenincasa",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tunarr/server",
|
||||
"version": "1.0.14",
|
||||
"version": "1.0.15",
|
||||
"description": "Create LiveTV channels from your Plex media",
|
||||
"license": "Zlib",
|
||||
"private": true,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tunarr/shared",
|
||||
"version": "1.0.14",
|
||||
"version": "1.0.15",
|
||||
"description": "Utility functions shared between server and web",
|
||||
"private": true,
|
||||
"keywords": [],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tunarr/types",
|
||||
"version": "1.0.14",
|
||||
"version": "1.0.15",
|
||||
"description": "Type definitions and schemas shared between server and web",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tunarr/web",
|
||||
"version": "1.0.14",
|
||||
"version": "1.0.15",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user