[#106] serivce/ir: Add NeoFS CLI binary in required artifacts
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
74717177c0
commit
3713201f62
2 changed files with 28 additions and 2 deletions
4
.env
4
.env
|
@ -28,3 +28,7 @@ S3_GW_IMAGE=nspccdev/neofs-s3-gw
|
||||||
# NeoFS LOCODE database
|
# NeoFS LOCODE database
|
||||||
LOCODE_DB_URL=https://github.com/nspcc-dev/neofs-locode-db/releases/download/v0.1.0/locode_db.gz
|
LOCODE_DB_URL=https://github.com/nspcc-dev/neofs-locode-db/releases/download/v0.1.0/locode_db.gz
|
||||||
#LOCODE_DB_PATH=/path/to/locode_db
|
#LOCODE_DB_PATH=/path/to/locode_db
|
||||||
|
|
||||||
|
# NeoFS CLI binary
|
||||||
|
NEOFS_CLI_URL=https://github.com/nspcc-dev/neofs-node/releases/download/v0.22.0/neofs-cli-v0.22.0-amd64.tar.gz
|
||||||
|
#NEOFS_CLI_PATH=/path/to/neofs-cli-binary
|
||||||
|
|
|
@ -3,8 +3,10 @@
|
||||||
LOCODE_DB_ARCHIVE_PATH=./vendor
|
LOCODE_DB_ARCHIVE_PATH=./vendor
|
||||||
LOCODE_DB_ARCHIVE_FILE=locode_db.gz
|
LOCODE_DB_ARCHIVE_FILE=locode_db.gz
|
||||||
|
|
||||||
get.ir: LOCODE_DB_PATH?=
|
get.ir: get.locode get.cli
|
||||||
get.ir:
|
|
||||||
|
get.locode: LOCODE_DB_PATH?=
|
||||||
|
get.locode:
|
||||||
@mkdir -p ${LOCODE_DB_ARCHIVE_PATH}
|
@mkdir -p ${LOCODE_DB_ARCHIVE_PATH}
|
||||||
|
|
||||||
ifeq (${LOCODE_DB_PATH},)
|
ifeq (${LOCODE_DB_PATH},)
|
||||||
|
@ -18,3 +20,23 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
gzip -dfk ${LOCODE_DB_ARCHIVE_PATH}/${LOCODE_DB_ARCHIVE_FILE}
|
gzip -dfk ${LOCODE_DB_ARCHIVE_PATH}/${LOCODE_DB_ARCHIVE_FILE}
|
||||||
|
|
||||||
|
.ONESHELL:
|
||||||
|
get.cli: NEOFS_CLI_FILE=./vendor/neofs-cli
|
||||||
|
get.cli: NEOFS_CLI_ARCHIVE_FILE=${NEOFS_CLI_FILE}.tar.gz
|
||||||
|
get.cli: NEOFS_CLI_PATH?=
|
||||||
|
get.cli:
|
||||||
|
@mkdir -p ./vendor
|
||||||
|
|
||||||
|
ifeq (${NEOFS_CLI_PATH},)
|
||||||
|
@echo "⇒ Download NeoFS CLI binary from ${NEOFS_CLI_URL}"
|
||||||
|
@curl \
|
||||||
|
-sSL "${NEOFS_CLI_URL}" \
|
||||||
|
-o ${NEOFS_CLI_ARCHIVE_FILE}
|
||||||
|
@tar -xvf ${NEOFS_CLI_ARCHIVE_FILE} -C ./vendor | xargs -I {} \
|
||||||
|
mv ./vendor/{} ${NEOFS_CLI_FILE}
|
||||||
|
@rm ${NEOFS_CLI_ARCHIVE_FILE}
|
||||||
|
else
|
||||||
|
@echo "⇒ Copy local binary from ${NEOFS_CLI_PATH}"
|
||||||
|
@cp ${NEOFS_CLI_PATH} ${NEOFS_CLI_FILE}
|
||||||
|
endif
|
||||||
|
|
Loading…
Reference in a new issue