BlueGit

timfa frameworkv3

autobuild on gitlab

timfa Tim · pushed by timfa

Authored 2024-03-26 · 2 years ago

Hash
59d178e724c3602fdaa85c9aec5a28cb903278cd
Parent
88c9d4aa
2 files changed +43 −0
.gitlab-ci.yml added +20 −0
@@ -0,0 +1,20 @@
1 # .gitlab-ci.yml
2
3 # Define stages for the pipeline
4 stages:
5 - deploy
6
7 # Define a job that runs when something is pushed to the master branch
8 deploy_job:
9 stage: deploy
10 script:
11 - apt-get update -qy
12 # - apt-get install -y lftp
13 - chmod +x ./glbuild.sh # Ensure the script is executable
14 - ./glbuild.sh # Execute the script
15 #werkt nog niet# - lftp -c "open -u 300889,25Up3uwb! sftp://sftp.timfalken.com; mirror -R js /public/sites/projects.timfalken.com/frameworkv3"
16 artifacts:
17 paths:
18 - js/framework.js
19 only:
20 - master # Run this job only when changes are pushed to the master branch
@@ -0,0 +1,20 @@
1# .gitlab-ci.yml
2
3# Define stages for the pipeline
4stages:
5 - deploy
6
7# Define a job that runs when something is pushed to the master branch
8deploy_job:
9 stage: deploy
10 script:
11 - apt-get update -qy
12 # - apt-get install -y lftp
13 - chmod +x ./glbuild.sh # Ensure the script is executable
14 - ./glbuild.sh # Execute the script
15 #werkt nog niet# - lftp -c "open -u 300889,25Up3uwb! sftp://sftp.timfalken.com; mirror -R js /public/sites/projects.timfalken.com/frameworkv3"
16 artifacts:
17 paths:
18 - js/framework.js
19 only:
20 - master # Run this job only when changes are pushed to the master branch
glbuild.sh added +23 −0
@@ -0,0 +1,23 @@
1 BUILD_FILE="./js/framework.js"
2 SRC_DIR="./framework"
3
4 printf "Build started, output file: $BUILD_FILE\n"
5 unlink $BUILD_FILE
6
7 loop() {
8 shopt -s nullglob
9 shopt -s globstar
10
11 for file in "$@"/**
12 do
13 if [[ -f "$file" && "${file##*.}" = "js" ]]
14 then
15 printf "\n/*\n * Start File:\n * "$file"\n */ \n" >> "$BUILD_FILE";
16 printf "Building "$file"\n";
17 cat "$file" >> "$BUILD_FILE";
18 printf "\n/*\n * End File:\n * "$file"\n */ \n" >> "$BUILD_FILE";
19 fi
20 done
21 }
22 loop $SRC_DIR
23 printf "DONE"
@@ -0,0 +1,23 @@
1BUILD_FILE="./js/framework.js"
2SRC_DIR="./framework"
3
4printf "Build started, output file: $BUILD_FILE\n"
5unlink $BUILD_FILE
6
7loop() {
8 shopt -s nullglob
9 shopt -s globstar
10
11 for file in "$@"/**
12 do
13 if [[ -f "$file" && "${file##*.}" = "js" ]]
14 then
15 printf "\n/*\n * Start File:\n * "$file"\n */ \n" >> "$BUILD_FILE";
16 printf "Building "$file"\n";
17 cat "$file" >> "$BUILD_FILE";
18 printf "\n/*\n * End File:\n * "$file"\n */ \n" >> "$BUILD_FILE";
19 fi
20 done
21}
22loop $SRC_DIR
23printf "DONE"