autobuild on gitlab
@@ -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.yml2
3
# Define stages for the pipeline4
stages:5
- deploy6
7
# Define a job that runs when something is pushed to the master branch8
deploy_job:9
stage: deploy10
script:11
- apt-get update -qy12
# - apt-get install -y lftp13
- chmod +x ./glbuild.sh # Ensure the script is executable14
- ./glbuild.sh # Execute the script15
#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.js19
only:20
- master # Run this job only when changes are pushed to the master branch@@ -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 @@1
BUILD_FILE="./js/framework.js"2
SRC_DIR="./framework"3
4
printf "Build started, output file: $BUILD_FILE\n"5
unlink $BUILD_FILE6
7
loop() {8
shopt -s nullglob9
shopt -s globstar10
11
for file in "$@"/**12
do13
if [[ -f "$file" && "${file##*.}" = "js" ]]14
then15
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
fi20
done21
}22
loop $SRC_DIR23
printf "DONE"