refactor: Component hierarchy and code cleanup (#1319)
This commit is contained in:
@@ -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
|
||||
Executable
+23
@@ -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
|
||||
Executable
+41
@@ -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
|
||||
Reference in New Issue
Block a user