Skip to content
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

ci: bun を追加 #434

Merged
merged 2 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
.classpath
.project

# dependencies
node_modules

# Files and directories created by pub
.dart_tool/

Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
bun 1.1.15
flutter 3.23.0-0.1.pre-beta
firebase 13.11.2
ruby 3.3.3
Binary file added bun.lockb
Binary file not shown.
3 changes: 3 additions & 0 deletions commitlint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional']
}
40 changes: 40 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# EXAMPLE USAGE:
#
# Refer for explanation to following link:
# https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md
#
commit-msg:
commands:
"lint commit message":
run: bun run commitlint --edit {1}

# pre-push:
# commands:
# packages-audit:
# tags: frontend security
# run: yarn audit
# gems-audit:
# tags: backend security
# run: bundle audit
#
# pre-commit:
# parallel: true
# commands:
# eslint:
# glob: "*.{js,ts,jsx,tsx}"
# run: yarn eslint {staged_files}
# rubocop:
# tags: backend style
# glob: "*.rb"
# exclude: '(^|/)(application|routes)\.rb$'
# run: bundle exec rubocop --force-exclusion {all_files}
# govet:
# tags: backend style
# files: git ls-files -m
# glob: "*.go"
# run: go vet {files}
# scripts:
# "hello.js":
# runner: node
# "any.go":
# runner: go run
20 changes: 20 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "asis-app",
"version": "1.0.0",
"description": "The quest to live life as it is",
"license": "MIT",
"author": {
"name": "Ryo Takeuchi",
"url": "https://tatsutakein.jp"
},
"type": "module",
"scripts": {
"clean": "git clean -xdf node_modules"
},
"devDependencies": {
"@commitlint/cli": "19.3.0",
"@commitlint/config-conventional": "19.2.2",
"firebase-tools": "13.11.2",
"lefthook": "1.6.16"
}
}
36 changes: 36 additions & 0 deletions tool/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,42 @@ else
echo "⚠️ mise install: See https://mise.jdx.dev/getting-started.html for installation."
fi

##############################################################################
##
## bun
##
##############################################################################
echo ""
echo "🚀 bun install: Start"
if type bun >/dev/null 2>&1; then
if bun install; then
echo "✅ bun install: Success"
else
echo "🚫 bun install: Failed"
fi
else
echo "⚠️ bun install: Skip bun because it could not be found."
echo "⚠️ bun install: This may be due to the fact that the mise installation has not been completed."
fi
Comment on lines +53 to +69
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bun のインストールを処理するセクションの追加は、PRの目的に沿っています。ただし、エラーメッセージの文言が少し不正確です。例えば、「mise installation has not been completed」というメッセージが表示されますが、このスクリプトは mise のインストール状況を直接確認していません。より正確なエラーメッセージを提供することをお勧めします。

-  echo "⚠️ bun install: This may be due to the fact that the mise installation has not been completed."
+  echo "⚠️ bun install: bunが見つかりません。インストールが必要かもしれません。"
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
##############################################################################
##
## bun
##
##############################################################################
echo ""
echo "🚀 bun install: Start"
if type bun >/dev/null 2>&1; then
if bun install; then
echo "✅ bun install: Success"
else
echo "🚫 bun install: Failed"
fi
else
echo "⚠️ bun install: Skip bun because it could not be found."
echo "⚠️ bun install: This may be due to the fact that the mise installation has not been completed."
fi
##############################################################################
##
## bun
##
##############################################################################
echo ""
echo "🚀 bun install: Start"
if type bun >/dev/null 2>&1; then
if bun install; then
echo "✅ bun install: Success"
else
echo "🚫 bun install: Failed"
fi
else
echo "⚠️ bun install: Skip bun because it could not be found."
echo "⚠️ bun install: bunが見つかりません。インストールが必要かもしれません。"


##############################################################################
##
## lefthook
##
##############################################################################
echo ""
echo "🚀 lefthook install: Start"
if type lefthook >/dev/null 2>&1; then
if lefthook install; then
echo "✅ lefthook install: Success"
else
echo "🚫 lefthook install: Failed"
fi
else
echo "⚠️ lefthook install: Skip bun because it could not be found."
echo "⚠️ lefthook install: This may be due to the fact that the mise installation has not been completed."
fi
Comment on lines +71 to +87
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lefthook のインストールセクションも同様に追加されており、PRの目的に適合しています。ただし、エラーメッセージには誤りがあり、「Skip bun」とありますが、これは明らかにコピペのミスでしょう。正しいツール名に修正する必要があります。

-  echo "⚠️ lefthook install: Skip bun because it could not be found."
+  echo "⚠️ lefthook install: Skip lefthook because it could not be found."
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
##############################################################################
##
## lefthook
##
##############################################################################
echo ""
echo "🚀 lefthook install: Start"
if type lefthook >/dev/null 2>&1; then
if lefthook install; then
echo "✅ lefthook install: Success"
else
echo "🚫 lefthook install: Failed"
fi
else
echo "⚠️ lefthook install: Skip bun because it could not be found."
echo "⚠️ lefthook install: This may be due to the fact that the mise installation has not been completed."
fi
##############################################################################
##
## lefthook
##
##############################################################################
echo ""
echo "🚀 lefthook install: Start"
if type lefthook >/dev/null 2>&1; then
if lefthook install; then
echo "✅ lefthook install: Success"
else
echo "🚫 lefthook install: Failed"
fi
else
echo "⚠️ lefthook install: Skip lefthook because it could not be found."
echo "⚠️ lefthook install: This may be due to the fact that the mise installation has not been completed."
fi


##############################################################################
##
## Generate gitignore target files
Expand Down
Loading