refactor: Component hierarchy and code cleanup (#1319)

This commit is contained in:
Alex Hancock
2025-02-21 11:29:07 -05:00
committed by GitHub
parent bfe23765b5
commit 81a0334aa1
28 changed files with 475 additions and 823 deletions
+9
View File
@@ -0,0 +1,9 @@
# Goosey
Put `goosey` in your $PATH if you want to launch via:
```
goosey .
```
This will open goose GUI from any path you specify
+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/env sh
KEY_CHAIN=build.keychain
CERTIFICATE_P12=certificate.p12
# Recreate the certificate from the secure environment variable
echo $CERTIFICATE_OSX_APPLICATION | base64 --decode > $CERTIFICATE_P12
#create a keychain
security create-keychain -p actions $KEY_CHAIN
# Make the keychain the default so identities are found
security default-keychain -s $KEY_CHAIN
# Unlock the keychain
security unlock-keychain -p actions $KEY_CHAIN
security import $CERTIFICATE_P12 -k $KEY_CHAIN -P $CERTIFICATE_PASSWORD -T /usr/bin/codesign;
security set-key-partition-list -S apple-tool:,apple: -s -k actions $KEY_CHAIN
# remove certs
rm -fr *.p12
+41
View File
@@ -0,0 +1,41 @@
#!/bin/bash
# Get the absolute path of the current directory
current_dir="$(pwd)"
# If an argument is provided, use it as the directory
if [ $# -gt 0 ]; then
# Handle tilde expansion and relative paths
if [[ "$1" == "~"* ]]; then
# Replace ~ with $HOME
dir="${1/#\~/$HOME}"
elif [[ "$1" == "." ]]; then
# Use absolute path as is
dir="$current_dir"
elif [[ "$1" == "."* ]]; then
# Convert relative path to absolute
dir="$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
else
# Convert relative path to absolute
dir="$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
fi
else
# Use current directory if no argument provided
dir="$current_dir"
fi
echo $dir
# On macOS, use the .app bundle
if [[ "$OSTYPE" == "darwin"* ]]; then
# Assuming Goose.app is installed in /Applications
if [ -d "/Applications/Goose.app" ]; then
/Applications/Goose.app/Contents/MacOS/Goose --args --dir "$dir"
else
echo "Error: Goose.app not found in /Applications"
exit 1
fi
else
# For Linux, assuming the binary is installed in the PATH
goose-app --dir "$dir"
fi