Skip to content

Commit

Permalink
fix(dir): fix dir perm (#41)
Browse files Browse the repository at this point in the history
fix(dir): fix dir perm
  • Loading branch information
ysicing authored Jul 18, 2022
1 parent 81e4c61 commit 2422953
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.8
1.0.9
3 changes: 3 additions & 0 deletions cmd/boot/boot.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ func initRootDirectory() error {
return errors.Errorf("failed to mkdir %s, err: %s", dir, err)
}
}
if err := os.MkdirAll(common.DefaultQuickonDir, common.FileMode0777); err != nil {
return errors.Errorf("failed to mkdir %s, err: %s", common.DefaultQuickonDir, err)
}
return nil
}

Expand Down
2 changes: 2 additions & 0 deletions common/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ package common
import "time"

const (
FileMode0777 = 0o777
FileMode0755 = 0o755
FileMode0644 = 0o644
FileMode0600 = 0o600
Expand All @@ -21,6 +22,7 @@ const (
DefaultBinDir = ".qc/bin"
DefaultCfgDir = ".qc/config"
DefaultCacheDir = ".qc/cache"
DefaultQuickonDir = "/opt/quickon/backup"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions hack/manifests/plugins/plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@
{
"name": "cne-operator",
"description": "渠成云原生应用交付平台控制器",
"version": "1.1.1",
"version": "1.1.2",
"home": "https://www.qucheng.com",
"appversion": "1.1.1",
"appversion": "1.1.2",
"path": "cne-operator",
"tool": "helm",
"builtin": true
Expand Down
8 changes: 8 additions & 0 deletions hack/scripts/get.edge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ setup_tmp() {
trap cleanup INT EXIT
}

setup_quickon() {
[ -d "/opt/quickon/backup" ] || (
mkdir -p /opt/quickon/backup
chmod 777 /opt/quickon/backup
)
}

# --- use desired qcadmin version if defined or find version from channel ---
get_release_version() {
VERSION="edge"
Expand Down Expand Up @@ -142,6 +149,7 @@ download_and_verify() {
setup_verify_arch
verify_downloader curl || verify_downloader wget || fatal 'Can not find curl or wget for downloading files'
setup_tmp
setup_quickon
get_release_version
# Skip download if qcadmin binary exists, support upgrade
download_binary
Expand Down
8 changes: 8 additions & 0 deletions hack/scripts/get.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ setup_tmp() {
trap cleanup INT EXIT
}

setup_quickon() {
[ -d "/opt/quickon/backup" ] || (
mkdir -p /opt/quickon/backup
chmod 777 /opt/quickon/backup
)
}

# --- use desired qcadmin version if defined or find version from channel ---
get_release_version() {
VERSION="stable"
Expand Down Expand Up @@ -142,6 +149,7 @@ download_and_verify() {
setup_verify_arch
verify_downloader curl || verify_downloader wget || fatal 'Can not find curl or wget for downloading files'
setup_tmp
setup_quickon
get_release_version
# Skip download if qcadmin binary exists, support upgrade
download_binary
Expand Down

0 comments on commit 2422953

Please sign in to comment.