-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #271 from mlibrary/2023-08-07-updates
August 2023 dependency updates.
- Loading branch information
Showing
11 changed files
with
473 additions
and
295 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/sh | ||
# | ||
# An example hook script to verify what is about to be committed. | ||
# Called by "git commit" with no arguments. The hook should | ||
# exit with non-zero status after issuing an appropriate message if | ||
# it wants to stop the commit. | ||
# | ||
# To enable this hook, rename this file to "pre-commit". | ||
#!/bin/sh | ||
|
||
set -e | ||
rubyfiles=$(git diff --cached --name-only --diff-filter=ACM "*.rb" "Gemfile" | tr '\n' ' ') | ||
[ -z "$rubyfiles" ] && exit 0 | ||
|
||
# Standardize all ruby files | ||
echo "🧹 Formatting staged Ruby files using standardrb ($(echo $rubyfiles | wc -w | awk '{print $1}') total)" | ||
echo "$rubyfiles" | xargs docker-compose run --rm web bundle exec standardrb --fix | ||
|
||
# Add back the modified/prettified files to staging | ||
echo "$rubyfiles" | xargs git add | ||
|
||
echo "📋 Running tests with rspec" | ||
docker-compose run --rm web bundle exec rspec --format progress | ||
|
||
exit 0 |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,36 +13,13 @@ git clone [email protected]:mlibrary/account.git | |
cd account | ||
``` | ||
|
||
copy .env-example to .env | ||
|
||
run the `init.sh` script. | ||
```bash | ||
cp .env-example .env | ||
./init.sh | ||
``` | ||
|
||
edit .env with the appropriate environment variables | ||
|
||
build the containers | ||
|
||
```bash | ||
docker-compose build | ||
``` | ||
|
||
bundle install | ||
```bash | ||
docker-compose run --rm web bundle install | ||
``` | ||
|
||
npm install | ||
```bash | ||
docker-compose run --rm web npm install | ||
``` | ||
|
||
build styles and scripts | ||
|
||
```bash | ||
docker-compose run --rm web npm run build | ||
``` | ||
|
||
start containers | ||
|
||
```bash | ||
|
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
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
File renamed without changes.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
#must be run from the project root directory | ||
if [ -f ".env" ]; then | ||
echo "🌎 .env exists. Leaving alone" | ||
else | ||
echo "🌎 .env does not exist. Copying env.example to .env" | ||
cp env.example .env | ||
fi | ||
|
||
if [ -f ".git/hooks/pre-commit" ]; then | ||
echo "🪝 .git/hooks/pre-commit exists. Leaving alone" | ||
else | ||
echo " 🪝 .git/hooks/pre-commit does not exist. Copying .github/pre-commit to .git/hooks/" | ||
cp .github/pre-commit .git/hooks/pre-commit | ||
fi | ||
|
||
echo "🚢 Build docker images" | ||
docker-compose build | ||
|
||
echo "📦 Installing Gems" | ||
docker-compose run --rm web bundle | ||
|
||
echo "📦 Installing Node modules" | ||
docker-compose run --rm web npm install | ||
|
||
echo "📦 Building js and css" | ||
docker-compose run --rm web npm run build |
Oops, something went wrong.