diff --git a/Makefile b/Makefile index 1ee88d8..8c4a1d9 100755 --- a/Makefile +++ b/Makefile @@ -1,11 +1,10 @@ VERSION:=$(shell git describe --always) TARGET_ENV ?= dev -build: dist/hff-entry-forms-api.tar.gz dist/hff-entry-forms-web.tar.gz +build: api-image dist/hff-entry-forms-web.${TARGET_ENV}.tar.gz clean: -rm -r dist - -rm -r web/dist make -C api clean make -C web clean @@ -15,20 +14,22 @@ test: update-version: operations/update-version.sh -dist/hff-entry-forms-web.tar.gz: +api-image: + make -C api build-image + +dist/hff-entry-forms-web-${VERSION}.${TARGET_ENV}.tar.gz: -mkdir dist - TARGET_ENV=$(TARGET_ENV) make -C web build - tar czf dist/hff-entry-forms-web-${VERSION}.tar.gz -C web/dist . - cp dist/hff-entry-forms-web-${VERSION}.tar.gz dist/hff-entry-forms-web.tar.gz + TARGET_ENV=${TARGET_ENV} make -C web build + tar czf dist/hff-entry-forms-web-${VERSION}.${TARGET_ENV}.tar.gz -C web/dist . deploy-api: make -C api build-image push-image cd operations/terraform && terraform apply -target module.${TARGET_ENV}_env.aws_ecs_task_definition.hff_entry_forms_api -target module.${TARGET_ENV}_env.aws_ecs_service.hff_entry_forms_api -deploy-web: dist/hff-entry-forms-web.tar.gz +deploy-web: dist/hff-entry-forms-web-${VERSION}.${TARGET_ENV}.tar.gz mkdir -p temp-deploy/hff-entry-forms-web-${VERSION} - tar xzf dist/hff-entry-forms-web-${VERSION}.tar.gz -C temp-deploy/hff-entry-forms-web-${VERSION} - aws s3 sync temp-deploy/hff-entry-forms-web-${VERSION} s3://forms.hopefamilyfellowship.com/$(TARGET_ENV)/webroot + tar xzf dist/hff-entry-forms-web-${VERSION}.${TARGET_ENV}.tar.gz -C temp-deploy/hff-entry-forms-web-${VERSION} + aws s3 sync temp-deploy/hff-entry-forms-web-${VERSION} s3://forms.hopefamilyfellowship.com/${TARGET_ENV}/webroot TARGET_ENV=${TARGET_ENV} operations/invalidate-cdn-cache.sh rm -r temp-deploy diff --git a/api/hff_entry_forms_api.nimble b/api/hff_entry_forms_api.nimble index b7aaf64..a358fe2 100644 --- a/api/hff_entry_forms_api.nimble +++ b/api/hff_entry_forms_api.nimble @@ -1,6 +1,6 @@ # Package -version = "0.3.0" +version = "0.3.1" author = "Jonathan Bernard" description = "Hope Family Fellowship entry forms." license = "GPL-3.0-or-later" diff --git a/api/src/hff_entry_forms_apipkg/version.nim b/api/src/hff_entry_forms_apipkg/version.nim index 5cdb1ae..e77ada6 100755 --- a/api/src/hff_entry_forms_apipkg/version.nim +++ b/api/src/hff_entry_forms_apipkg/version.nim @@ -1 +1 @@ -const HFF_ENTRY_FORMS_API_VERSION* = "0.3.0" \ No newline at end of file +const HFF_ENTRY_FORMS_API_VERSION* = "0.3.1" \ No newline at end of file diff --git a/web/package-lock.json b/web/package-lock.json index a1bf61b..dcefc05 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -1,6 +1,6 @@ { "name": "hff-entry-form-web", - "version": "0.3.0", + "version": "0.3.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/web/package.json b/web/package.json index 511b8ae..f72cad6 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "hff-entry-form-web", - "version": "0.3.0", + "version": "0.3.1", "private": true, "scripts": { "serve": "npx servor dist",