File tree Expand file tree Collapse file tree 6 files changed +17
-443
lines changed
Expand file tree Collapse file tree 6 files changed +17
-443
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,6 @@ mod build 'tasks/build'
2727mod test ' tasks/test'
2828mod config ' tasks/config'
2929mod manage ' tasks/manage'
30- mod prep ' tasks/prep'
31- mod chart ' tasks/chart'
3230mod docs ' tasks/docs'
3331mod i18n ' tasks/i18n'
3432
@@ -41,6 +39,18 @@ default:
4139help :
4240 just --justfile {{ justfile ()}} --list
4341
42+ # Prep module from https://github.com/hotosm/justfiles
43+ prep * args :
44+ @ curl -sS https:// raw.githubusercontent.com/ hotosm/ justfiles/ main/ prep.just \
45+ - o {{ justfile_directory ()}} / tasks/ prep.just;
46+ @ just --justfile {{ justfile_directory ()}} / tasks/ prep.just {{ args}}
47+
48+ # Chart module from https://github.com/hotosm/justfiles
49+ chart * args :
50+ @ curl -sS https:// raw.githubusercontent.com/ hotosm/ justfiles/ main/ chart.just \
51+ - o {{ justfile_directory ()}} / tasks/ chart.just;
52+ @ just --justfile {{ justfile_directory ()}} / tasks/ chart.just --set chart_name " field-tm" {{ args}}
53+
4454# Delete local database, S3, and ODK Central data
4555clean :
4656 {{ docker}} compose down -v
Original file line number Diff line number Diff line change 1+ # Justfiles imported from https://github.com/hotosm/justfiles
2+ * .just
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ generate-dotenv branch="dev":
5959 # By default we deploy from 'dev' branch, but can be overridden
6060
6161 cd {{justfile_directory()}}
62- just manage _install_envsubst
62+ just prep envsubst
6363
6464 if [ -f .env ]; then
6565 just _echo-yellow "'.env' already exists. Skipping generation."
Original file line number Diff line number Diff line change 2121default:
2222 just --justfile {{justfile()}} --list manage
2323
24- # Install envsubst
25- [no-cd]
26- [no-exit-message]
27- _install_envsubst:
28- #!/usr/bin/env bash
29- just prep _curl
30-
31- echo
32- # Get a8m/envsubst (required for default vals syntax ${VAR:-default})
33- # Use local version, as envsubst may be installed on system already
34- if [ -f ./envsubst ]; then
35- echo "envsubst already exists. Continuing."
36- else
37- echo "Downloading a8m/envsubst"
38- echo
39- curl -L "https://github.com/a8m/envsubst/releases/download/v1.2.0/envsubst-$(uname -s)-$(uname -m)" -o envsubst
40- chmod +x envsubst
41- fi
42-
4324# Rename docker volume
4425[no-cd]
4526rename-volume oldname newname:
@@ -64,7 +45,7 @@ upgrade-dev-db:
6445
6546 cd {{justfile_directory()}}
6647
67- just manage _install_envsubst
48+ just prep envsubst
6849
6950 ./envsubst -i contrib/pg-upgrade/compose.yaml | \
7051 docker compose -f - up --abort-on-container-failure
@@ -82,7 +63,7 @@ upgrade-db:
8263 GIT_BRANCH="development"
8364 fi
8465
85- just manage _install_envsubst
66+ just prep envsubst
8667
8768 export VOLUME_NAME=field-tm-db-data-${GIT_BRANCH}
8869
You can’t perform that action at this time.
0 commit comments