From 56f8557d15e598a71fc99c74bde7160df4bde4a1 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello <fabio@manganiello.tech> Date: Fri, 28 Feb 2025 01:38:40 +0100 Subject: [PATCH] [CI/CD] Added build step. --- .drone.yml | 9 +++++++++ .drone/build-all.sh | 4 ++++ Makefile | 6 ++++++ README.md | 6 ++++++ 4 files changed, 25 insertions(+) create mode 100755 .drone/build-all.sh create mode 100644 Makefile diff --git a/.drone.yml b/.drone.yml index aee27a8..3c8d1b7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -19,3 +19,12 @@ steps: commands: - . .drone/github-mirror.sh + +### +### Run a smoke test of the application by trying a full build +### + +- name: build + image: node:current-alpine3.20 + commands: + - . .drone/build-all.sh diff --git a/.drone/build-all.sh b/.drone/build-all.sh new file mode 100755 index 0000000..7c25a30 --- /dev/null +++ b/.drone/build-all.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +npm install typescript -g +make diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8a82e90 --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +all: + npm install + npm run build + cd frontend + npm install + npm run build diff --git a/README.md b/README.md index 3c3e6a6..0d4d722 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,12 @@ GPSTracker is a simple Webapp that consists of: ## Building the application +```sh +make +``` + +Or, if you want to build the backend and the frontend separately: + ```sh # Backend npm install