File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # use with https://github.com/casey/just
2+ #
3+ # Cluster Stack Creation automation
4+ #
5+
6+ set export
7+ set dotenv-filename := " just.env"
8+ set dotenv-load
9+
10+ path := env_var (' PATH' ) + " :" + justfile_directory () + " /bin"
11+
12+ default :
13+ @ just --list --justfile {{ justfile ()}}
14+
15+ # Check if csctl and clusterstack-provider-openstack are available and build them if neccessary
16+ [no-cd ]
17+ ensure-dependencies :
18+ #!/usr/bin/env bash
19+ export PATH=${path}
20+ if ! which csctl > /dev/null 2>&1 ; then
21+ echo " csctl not found, building it from source."
22+ mkdir -p bin
23+ pushd bin
24+ git clone https://github.com/SovereignCloudStack/csctl csctl-git
25+ pushd csctl-git
26+ make build
27+ mv csctl ../csctl
28+ popd
29+ rm -rf csctl-git
30+ popd
31+ fi
32+
33+ if ! which csctl-openstack > /dev/null 2>&1 ; then
34+ echo " csctl-plugin-openstack not found, building it from source."
35+ mkdir -p bin
36+ pushd bin
37+ git clone https://github.com/SovereignCloudStack/csctl-plugin-openstack
38+ pushd csctl-plugin-openstack
39+ make build
40+ mv csctl-openstack ../csctl-openstack
41+ popd
42+ rm -rf csctl-plugin-openstack
43+ popd
44+ fi
45+
46+ if [[ -d bin ]]; then
47+ export PATH=" ${PATH} :$( pwd) /bin"
48+ fi
49+
50+ # Clean temporary files and binaries
51+ clean :
52+ #!/usr/bin/env bash
53+ rm -rf bin
54+
55+ # Build Clusterstacks version
56+ build : ensure-dependencies
57+ ./ hack/ generate_version.py --build
You can’t perform that action at this time.
0 commit comments