Skip to content

Commit

Permalink
Merge branch 'main' into gh-8
Browse files Browse the repository at this point in the history
  • Loading branch information
DEMAxx authored Jun 18, 2024
2 parents 6d1c5ba + 7439473 commit f53ec8e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 17 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
18 changes: 3 additions & 15 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
image: alpine:latest
image:
name: docker-web.cdek.ru/phnodenx-dev-rocky9-8.2
entrypoint: ['']

stages:
- build
Expand All @@ -10,31 +12,20 @@ variables:
ARTIFACTORY_REPO: "https://repo.cdek.ru/artifactory/erp-cms"

build_tag:
image: php:8.2-alpine
stage: build
tags:
- docker
only:
- tags
before_script:
- apk add nodejs-current yarn
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
- php composer-setup.php
- php -r "unlink('composer-setup.php');"
- mv composer.phar /usr/local/bin/composer
- export RELEASE_VERSION=$(echo "${CI_COMMIT_TAG}" | sed 's/v//')
script:
- sed -i "s/\(Version:\)\( *\).*/\1\2${RELEASE_VERSION}/" cdek.php
- sed -i "s/\(Stable tag:\)\( *\).*/\1\2${RELEASE_VERSION}/" readme.txt
- sed -i "s/\(Project-Id-Version:\)\( *\).*/\1\2CDEKDelivery ${RELEASE_VERSION}/" lang/cdekdelivery.pot
- sed -i "s/\(Project-Id-Version:\)\( *\).*/\1\2CDEKDelivery ${RELEASE_VERSION}/" lang/cdekdelivery-ru_RU.po
- yarn set version berry
- yarn
- yarn build
- rm -rf node_modules
- composer i -a
- vendor/bin/wp i18n --allow-root make-mo lang lang
- vendor/bin/wp i18n --allow-root make-json --no-purge lang lang
- composer i -a --no-dev
- composer archive -f zip --file=cdek
artifacts:
Expand All @@ -47,7 +38,6 @@ build_custom:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: always
- when: manual
image: php:8.2-alpine
stage: build
tags:
- docker
Expand All @@ -56,7 +46,6 @@ build_custom:
paths:
- cdek.zip
before_script:
- !reference [build_tag, before_script]
- export RELEASE_VERSION="${CI_COMMIT_REF_NAME}#${CI_COMMIT_SHORT_SHA}"
script:
- !reference [build_tag, script]
Expand All @@ -71,7 +60,6 @@ upload:
only:
- tags
before_script:
- apk add curl zip
- export RELEASE_VERSION=$(echo "${CI_COMMIT_TAG}" | sed 's/v//')
- export ARCHIVE_VERSION=$(echo "${RELEASE_VERSION}" | sed 's/\./_/g')
script:
Expand Down
4 changes: 4 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
nodeLinker: node-modules

npmRegistryServer: "https://repo.cdek.ru/artifactory/api/npm/npm-public/"

yarnPath: .yarn/releases/yarn-4.2.2.cjs
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@
"volta": {
"node": "20.13.1",
"yarn": "4.2.2"
}
},
"packageManager": "[email protected]"
}
2 changes: 1 addition & 1 deletion src/Actions/CreateOrderAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function __invoke(int $orderId, int $attempt = 0, array $packages = null)

$orderData = $this->api->createOrder($param);

sleep(1);
sleep(5);

$cdekNumber = $this->getCdekOrderNumber($orderData['entity']['uuid']);

Expand Down

0 comments on commit f53ec8e

Please sign in to comment.