This commit is contained in:
Mayel de Borniol 2022-06-17 10:34:16 +12:00
parent de0c0ab13c
commit f6012de8ab
3 changed files with 39 additions and 45 deletions

View file

@ -12,16 +12,6 @@
resolved "https://registry.yarnpkg.com/@alpinejs/intersect/-/intersect-3.10.2.tgz#8f44c6eaefffdd1bc9c55f55ccf757540b88eeb1"
integrity sha512-BP6rO7lwqDF2mpa6ami3FPPu8zK622sWLQ27Ru5Hu4YzFhMUnX05jwZc1pEsZzY46QWyeInDLgMTB+XyH5e6sQ==
"@github/details-dialog-element@^3.1.3":
version "3.1.3"
resolved "https://registry.yarnpkg.com/@github/details-dialog-element/-/details-dialog-element-3.1.3.tgz#898c21836c3412d675dbbc6092cbf4f8dece48d2"
integrity sha512-NWTiMK7jnQllsEtzkZ0S4+4NneXsGn+JU0YFum1GyVfVBIfHXue+Ev7qOJxwGoOyBzfeSNz1uxuRWUvX+lavaw==
"@github/details-menu-element@^1.0.12":
version "1.0.12"
resolved "https://registry.yarnpkg.com/@github/details-menu-element/-/details-menu-element-1.0.12.tgz#baf9cd5bcf8e40621a085380364090921eb3fae4"
integrity sha512-Icbq+xw7Qjb6byfRtC5cjk/eAxb+Wc4F/WS+L6VTHLYEfi8q/akDtHgViGeu854IMiJ/qDosfOGXGgSrleud2w==
"@nodelib/fs.scandir@2.1.5":
version "2.1.5"
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"

View file

@ -33,11 +33,15 @@ CONFIG_PATH := FLAVOUR_PATH + "/config"
UID := `id -u`
GID := `id -g`
# Configure just
set shell := ["bash", "-uc"]
## Configure just
# choose shell for running recipes
set shell := ["bash", "-uc"]
# set shell := ["bash", "-uxc"]
# load all vars from .env file
set dotenv-load
# export just vars into recipe as env vars
set export
# support args like $1, $2, etc, and $@ for all args
set positional-arguments
@ -97,7 +101,7 @@ prepare:
# Run the app in development
dev: init dev-run
dev-run:
@dev-run:
{{ if WITH_DOCKER == "total" { "just docker-stop-web && docker-compose run --name $WEB_CONTAINER --service-ports web" } else { "iex -S mix phx.server" } }}
# Generate docs from code & readmes
@ -210,11 +214,11 @@ deps-clean-api:
js-deps-get: js-app-deps-get js-ext-deps-get
js-app-deps-get:
@chmod +x ./assets/install.sh
chmod +x ./assets/install.sh
just cmd ./assets/install.sh
js-ext-deps-get:
@chmod +x ./config/deps.js.sh
chmod +x ./config/deps.js.sh
just cmd ./config/deps.js.sh
deps-outdated:
@ -230,7 +234,7 @@ dep-clone-local dep repo:
# Clone all bonfire deps / extensions
deps-clone-local-all:
@curl -s https://api.github.com/orgs/bonfire-networks/repos?per_page=500 | ruby -rrubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[just dep.clone.local dep="#{repo["name"]}" repo="#{repo["ssh_url"]}" ]}'
curl -s https://api.github.com/orgs/bonfire-networks/repos?per_page=500 | ruby -rrubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[just dep.clone.local dep="#{repo["name"]}" repo="#{repo["ssh_url"]}" ]}'
# Switch to using a local path, eg: just dep.go.local pointers
dep-go-local dep:
@ -243,13 +247,13 @@ dep-go-local-path dep path:
# Switch to using a git repo, eg: just dep.go.git pointers https://github.com/bonfire-networks/pointers (specifying the repo is optional if previously specified)
dep-go-git dep repo:
just dep-git add $dep $repo 2> /dev/null || true
-just dep-git add $dep $repo
just dep-git enable $dep NA
just dep-local disable $dep NA
# Switch to using a library from hex.pm, eg: just dep.go.hex dep="pointers" version="_> 0.2" (specifying the version is optional if previously specified)
dep-go-hex dep version:
just dep-hex add dep=$dep version=$version 2> /dev/null || true
-just dep-hex add dep=$dep version=$version
just dep-hex enable $dep NA
just dep-git disable $dep NA
just dep-local disable $dep NA
@ -318,14 +322,14 @@ deps-git-fix:
find ./forks -mindepth 1 -maxdepth 1 -type d -exec git -C '{}' config core.fileMode false \;
# Draft-merge another branch, eg `just git-merge with-valueflows-api` to merge branch `with-valueflows-api` into the current one
git-merge branch:
@git-merge branch:
git merge --no-ff --no-commit $branch
# Find any git conflicts in ./forks
git-conflicts:
@git-conflicts:
find $FORKS_PATH -mindepth 1 -maxdepth 1 -type d -exec echo add {} \; -exec git -C '{}' diff --name-only --diff-filter=U \;
git-publish:
@git-publish:
chmod +x git-publish.sh
./git-publish.sh
@ -333,19 +337,19 @@ git-publish:
# Run tests. You can also run only specific tests, eg: `just test forks/bonfire_social/test`
test *args='':
@MIX_ENV=test just mix test $@
MIX_ENV=test just mix test $@
# Run only stale tests
test-stale *args='':
@MIX_ENV=test just mix test --stale $@
MIX_ENV=test just mix test --stale $@
# Run tests (ignoring changes in local forks)
test-remote *args='':
@MIX_ENV=test just mix-remote test $@
MIX_ENV=test just mix-remote test $@
# Run stale tests, and wait for changes to any module code, and re-run affected tests
test-watch *args='':
@MIX_ENV=test just mix test.watch --stale $@
MIX_ENV=test just mix test.watch --stale $@
# Run stale tests, and wait for changes to any module code, and re-run affected tests, and interactively choose which tests to run
test-interactive *args='':
@ -455,11 +459,11 @@ rel-services:
#### DOCKER-SPECIFIC COMMANDS ####
# Start background docker services (eg. db and search backends).
services:
@{{ if MIX_ENV == "prod" { "just rel-services" } else { "just dev-services" } }}
@services:
{{ if MIX_ENV == "prod" { "just rel-services" } else { "just dev-services" } }}
dev-services:
@{{ if WITH_DOCKER != "no" { "docker-compose up -d db search" } else {""} }}
@dev-services:
{{ if WITH_DOCKER != "no" { "docker-compose up -d db search" } else {""} }}
# Build the docker image
build: init
@ -470,22 +474,22 @@ rebuild: init
{{ if WITH_DOCKER != "no" { "mkdir -p deps && docker-compose build --no-cache" } else { "Skip building container..." } }}
# Run a specific command in the container (if used), eg: `just cmd messclt` or `just cmd time` or `just cmd "echo hello"`
cmd *args='': init
@{{ if WITH_DOCKER == "total" { "docker-compose run --service-ports web $@" } else {"$@"} }}
@cmd *args='': init
{{ if WITH_DOCKER == "total" { "docker-compose run --service-ports web $@" } else {"$@"} }}
# Open the shell of the web container, in dev mode
shell:
@just cmd bash
just cmd bash
docker-stop-web:
@docker stop $WEB_CONTAINER 2> /dev/null || true
@docker rm $WEB_CONTAINER 2> /dev/null || true
-docker stop $WEB_CONTAINER
-docker rm $WEB_CONTAINER
#### MISC COMMANDS ####
# Run a specific mix command, eg: `just mix deps.get` or `just mix "deps.update pointers"`
mix *args='':
@just cmd mix $@
just cmd mix $@
# Run a specific mix command, while ignoring any deps cloned into ./forks, eg: `just mix-remote deps.get` or `just mix-remote deps.update pointers`
mix-remote *args='': init
@ -493,7 +497,7 @@ mix-remote *args='': init
# Run a specific exh command, see https://github.com/rowlandcodes/exhelp
exh *args='':
@just cmd "exh -S mix $@"
just cmd "exh -S mix $@"
licenses:
@mkdir -p docs/DEPENDENCIES/
@ -501,7 +505,7 @@ licenses:
# Extract strings to-be-localised from the app and installed extensions
localise-extract:
@just mix "bonfire.localise.extract"
just mix "bonfire.localise.extract"
cd priv/localisation/ && for f in *.pot; do mv -- "$f" "${f%.pot}.po"; done
localise-rename:
@ -513,13 +517,13 @@ localise-rename:
done
assets-prepare:
@cp lib/*/*/overlay/* rel/overlays/ 2> /dev/null || true
-cp lib/*/*/overlay/* rel/overlays/
# Workarounds for some issues running migrations
db-pre-migrations:
touch deps/*/lib/migrations.ex 2> /dev/null || echo "continue"
touch forks/*/lib/migrations.ex 2> /dev/null || echo "continue"
touch priv/repo/* 2> /dev/null || echo "continue"
-touch deps/*/lib/migrations.ex
-touch forks/*/lib/migrations.ex
-touch priv/repo/*
# Generate secrets
secrets:

View file

@ -26,7 +26,7 @@
"bonfire_data_social": {:git, "https://github.com/bonfire-networks/bonfire_data_social", "1cec52d51219a42dde7df434a3602f4914450d7f", [branch: "main"]},
"bonfire_ecto": {:git, "https://github.com/bonfire-networks/bonfire_ecto", "88ad2c495c07a33d7df0f0b825e96c2b9cf1f2e0", [branch: "main"]},
"bonfire_editor_ck": {:git, "https://github.com/bonfire-networks/bonfire_editor_ck", "de6678fe91873b111d8fd05b4b1f596562d5302f", [branch: "main"]},
"bonfire_editor_quill": {:git, "https://github.com/bonfire-networks/bonfire_editor_quill", "825d709a0d7c68be13a7db245c4df5d22f918746", [branch: "main"]},
"bonfire_editor_quill": {:git, "https://github.com/bonfire-networks/bonfire_editor_quill", "c950dad53a17b88fa27e89c1d7c0b6fa45c387c8", [branch: "main"]},
"bonfire_epics": {:git, "https://github.com/bonfire-networks/bonfire_epics", "f993fd6bfa7821e96325d14ebbbf4d3a40562cd2", [branch: "main"]},
"bonfire_fail": {:git, "https://github.com/bonfire-networks/bonfire_fail", "4ce2a1254c68388f8877e1c86dfd782a773600ea", [branch: "main"]},
"bonfire_federate_activitypub": {:git, "https://github.com/bonfire-networks/bonfire_federate_activitypub", "c5d88fdba897cc51cb01c94a94e8b017ccc1bba2", [branch: "main"]},
@ -40,12 +40,12 @@
"bonfire_search": {:git, "https://github.com/bonfire-networks/bonfire_search", "52ef12ec9b8d76533c65b34e3f2cd5629d8d0416", [branch: "main"]},
"bonfire_social": {:git, "https://github.com/bonfire-networks/bonfire_social", "c70b887ad398c7f87b854fcb683e9abaf4ad48fc", [branch: "main"]},
"bonfire_tag": {:git, "https://github.com/bonfire-networks/bonfire_tag", "f49d3c9d96efe628ca54ace02a029aedb752b74e", [branch: "main"]},
"bonfire_ui_common": {:git, "https://github.com/bonfire-networks/bonfire_ui_common", "8de9e109097263fe29fe7e44cebd5e0c5e4ae166", [branch: "main"]},
"bonfire_ui_common": {:git, "https://github.com/bonfire-networks/bonfire_ui_common", "4d95592e1a7c85d1e0938b7bf361b5616beb97fa", [branch: "main"]},
"bonfire_ui_coordination": {:git, "https://github.com/bonfire-networks/bonfire_ui_coordination", "40b24b68b542c31a0c99be2650b8148c5ad01161", [branch: "main"]},
"bonfire_ui_kanban": {:git, "https://github.com/bonfire-networks/bonfire_ui_kanban", "69f42c5c38e5d63e4e60b4ef8d0191224c297b14", [branch: "main"]},
"bonfire_ui_me": {:git, "https://github.com/bonfire-networks/bonfire_ui_me", "436549c104106e985559f32da8c42ee2e0932780", [branch: "main"]},
"bonfire_ui_me": {:git, "https://github.com/bonfire-networks/bonfire_ui_me", "6422989258ad5a062b0f4d43527b3fce3dd2fe23", [branch: "main"]},
"bonfire_ui_reflow": {:git, "https://github.com/bonfire-networks/bonfire_ui_reflow", "befd9ccb3b28b1e46e4a485deb493a041fde181b", [branch: "main"]},
"bonfire_ui_social": {:git, "https://github.com/bonfire-networks/bonfire_ui_social", "3ee51d73e071973f787f2b8e13725ab3f2f3caf3", [branch: "main"]},
"bonfire_ui_social": {:git, "https://github.com/bonfire-networks/bonfire_ui_social", "35d84818c221d9c6cfba3fce5bed61d70bb01988", [branch: "main"]},
"bonfire_ui_valueflows": {:git, "https://github.com/bonfire-networks/bonfire_ui_valueflows", "1b767e92009a9d82f5f258c9f8b415a8ee0c73c8", [branch: "main"]},
"bonfire_upcycle": {:git, "https://gitlab.com/bonfire-networks/bonfire_upcycle", "bb3fb7f2ad8664290913cf0d76f877b7aac2f269", [branch: "master"]},
"bonfire_valueflows": {:git, "https://github.com/bonfire-networks/bonfire_valueflows", "83d9148c94f876e946f6deba1fc67cfbbda6fd72", [branch: "main"]},