[gnome-bootstrap-theme] ci: build theme using gitlab ci
- From: Guillaume Bernard <gbernard src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bootstrap-theme] ci: build theme using gitlab ci
- Date: Mon, 26 Sep 2022 11:14:38 +0000 (UTC)
commit 6ac64d68fdbf9a96dd953d5aba33780b3c1a7f9b
Author: Guillaume Bernard <associations guillaume-bernard fr>
Date: Mon Sep 26 13:14:33 2022 +0200
ci: build theme using gitlab ci
.gitlab-ci.yml | 26 ++++++++++++++++++++++++++
build_deneb_theme.sh | 6 ++----
2 files changed, 28 insertions(+), 4 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..fe3e03c
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,26 @@
+stages:
+ - build
+
+build_theme:
+ stage: build
+ image: alpine:latest
+ script:
+ - apk add --no-cache uglify-js sassc
+ - ./build_deneb_theme.sh
+ artifacts:
+ name: deneb-$CI_COMMIT_BRANCH-$CI_COMMIT_REF_NAME
+ paths:
+ - dist
+ expire_in: 1 week
+ rules:
+ - if: $CI_COMMIT_TAG == null
+
+build_theme:tags:
+ extends: build_theme
+ artifacts:
+ name: deneb-CI_COMMIT_TAG
+ paths:
+ - dist
+ expire_in: 5y
+ rules:
+ - if: $CI_COMMIT_TAG != null
\ No newline at end of file
diff --git a/build_deneb_theme.sh b/build_deneb_theme.sh
index b4c4e95..ae7c2a7 100755
--- a/build_deneb_theme.sh
+++ b/build_deneb_theme.sh
@@ -1,15 +1,13 @@
#!/usr/bin/env bash
BOOTSTRAP_VERSION="$(grep bootstrap package.json | sed
"s/\"bootstrap\":\s\"\^\([[:digit:]]\.[[:digit:]]\).*\"/\1/" | tr -d " ")"
-declare -r BOOTSTRAP_VERSION
OUTPUT_DIRECTORY="./dist.bootstrap-${BOOTSTRAP_VERSION}"
-declare -r OUTPUT_DIRECTORY
mkdir -p "${OUTPUT_DIRECTORY}"
# CSS
-sass -t expanded src/css/main.scss >"${OUTPUT_DIRECTORY}/deneb.${BOOTSTRAP_VERSION}.css"
-sass -t compressed src/css/main.scss >"${OUTPUT_DIRECTORY}/deneb.${BOOTSTRAP_VERSION}.min.css"
+sassc -t expanded src/css/main.scss >"${OUTPUT_DIRECTORY}/deneb.${BOOTSTRAP_VERSION}.css"
+sassc -t compressed src/css/main.scss >"${OUTPUT_DIRECTORY}/deneb.${BOOTSTRAP_VERSION}.min.css"
cp ./node_modules/bootstrap/dist/css/bootstrap.rtl.min.css
"${OUTPUT_DIRECTORY}/deneb.rtl.${BOOTSTRAP_VERSION}.min.css"
cp ./node_modules/bootstrap/dist/css/bootstrap.rtl.min.css.map
"${OUTPUT_DIRECTORY}/deneb.rtl.${BOOTSTRAP_VERSION}.min.css.map"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]