-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublish.sh
executable file
·52 lines (39 loc) · 1.21 KB
/
publish.sh
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
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
#
# Publish changes to master branch
#
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
# echo "Replace software/vars/main.yml versions with .current-versions.yml"
# yq -i eval-all '. as $item ireduce ({}; . * $item)' ${SCRIPT_DIR}/ansible/roles/software/vars/main.yml ${SCRIPT_DIR}/current-versions.yml
# echo 'git add'
# git add .
#
# echo 'git commit updated versions'
# git commit -a -m 'build: Release updated versions'
echo 'Update docs'
rsync -avrE ${SCRIPT_DIR}/docs-web/docs/ ${SCRIPT_DIR}/docs-web/versioned_docs/version-stable/
echo 'git commit updated docs'
git commit -a -m 'build: Release updated docs'
echo 'git push'
git push
echo 'git checkout master'
git checkout master
echo 'git pull'
git pull
echo 'git rebase develop'
git rebase develop
echo 'git push'
git push
echo 'git checkout develop'
git checkout develop
# echo 'Replace software/vars/main.yml with .latest-versions.yml'
# yq -i eval-all '. as $item ireduce ({}; . * $item)' ${SCRIPT_DIR}/ansible/roles/software/vars/main.yml ${SCRIPT_DIR}/.latest-versions.yml
#
# echo 'git add'
# git add .
#
# echo 'git commit'
# git commit -a -m 'build: Set latest versions for development'
#
# echo 'git push'
# git push