-
Notifications
You must be signed in to change notification settings - Fork 433
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
Create dotnet-desktop.yml #221
Open
JoftheV
wants to merge
7
commits into
OkGoDoIt:master
Choose a base branch
from
JoftheV:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Updated workflow test
Add workflow. Commit and push. |
#!/bin/bash # Default values DEFAULT _PATH="/home/runner/work/OpenAI-API-dotnet/OpenAI-API-dotnet/package.json" FALLBACK _DIR="/home/runner/work/OpenAI-API-dotnet/OpenAI-API-dotnet/" LOG FILE="install _ _log.txt" # Function to log messages log_message() { local message="$1" echo "$(date '+%Y-%m-%d %H:%M:%S') - $message" >> "$LOG FILE" _ } # Function to check if a file exists file _exists() { [ -f "$1" ] } # Function to find package.json in a directory find _package_json() { local search dir="$1" _ find "$search _dir" -name "package.json" -print -quit } # Main script log_message "Starting path correction and installation process..." # Check if package.json exists at the default path if file exists "$DEFAULT _ _PATH"; then log_message "package.json found at $DEFAULT _ PATH." else log_message "package.json not found at $DEFAULT _ PATH." # Attempt to locate package.json in the fallback directory log_message "Searching for package.json in fallback directory $FALLBACK _ PACKAGE JSON _ _ PATH=$(find_package_json "$FALLBACK _DIR") DIR..." if [ -n "$PACKAGE JSON _ _PATH" ]; then log_message "package.json found at $PACKAGE JSON _ _ DEFAULT PATH="$PACKAGE JSON PATH" _ _ _ PATH." else log_message "Error: package.json not found in fallback directory." echo "Error: package.json not found. Check the log file $LOG _ exit 1 FILE for details." fi fi # Navigate to the directory containing package.json WORKING _ DIR=$(dirname "$DEFAULT _PATH") log_message "Changing directory to $WORKING DIR" _ cd "$WORKING _DIR" || { log_message "Failed to change directory to $WORKING _DIR."; echo "Failed to change directory. Check the log file $LOG _FILE for details."; exit 1; } # Run npm install log_message "Running npm install..." npm install >> "$LOG FILE" 2>&1 _ # Check if npm install was successful if [ $? -eq 0 ]; then log_message "npm install completed successfully." else log_message "Error: npm install failed." echo "Error: npm install failed. Check the log file $LOG _ exit 1 FILE for details." fi
JoftheV
commented
Jul 26, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
JoftheV
commented
Oct 23, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit and run
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@sourcery.ai review