forked from codeigniter4/CodeIgniter4
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy-userguide
More file actions
executable file
·42 lines (32 loc) · 783 Bytes
/
Copy pathdeploy-userguide
File metadata and controls
executable file
·42 lines (32 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
## Deploy codeigniter4/userguide
# Setup variables
SOURCE=$1
TARGET=$2
RELEASE=$3
VERSION=`echo "$RELEASE" | cut -c 2-`
echo "Preparing for version $3"
echo "Merging files from $1 to $2"
# Prepare the source
cd $SOURCE
git checkout master
cd user_guide_src
make html
make epub
# Prepare the target
cd $TARGET
git checkout master
rm -rf docs
# Copy common files
cp -Rf ${SOURCE}/LICENSE ./
# Copy repo-specific files
cp -Rf ${SOURCE}/admin/userguide/. ./
# Copy files
cp -Rf ${SOURCE}/user_guide_src/build/html ./docs
cp -Rf ${SOURCE}/user_guide_src/build/epub/CodeIgniter.epub ./CodeIgniter${VERSION}.epub
# Ensure underscore prefixed files are published
touch ${TARGET}/docs/.nojekyll
# Commit the changes
git add .
git commit -m "Release ${RELEASE}"
git push