diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ed3a3675a..638c0aa69 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -93,7 +93,7 @@ linux-snap: paths: - scripts/parity_*_amd64.snap name: "stable-x86_64-unknown-snap-gnu_parity" - allow_failure: true + allow_failure: true linux-stable-debian: stage: build image: parity/rust-debian:gitlab-ci @@ -244,7 +244,7 @@ linux-i686: - strip target/$PLATFORM/release/parity - strip target/$PLATFORM/release/parity-evm - strip target/$PLATFORM/release/ethstore - - strip target/$PLATFORM/release/ethkey + - strip target/$PLATFORM/release/ethkey - strip target/$PLATFORM/release/parity - md5sum target/$PLATFORM/release/parity > parity.md5 - export SHA3=$(target/$PLATFORM/release/parity tools hash target/$PLATFORM/release/parity) @@ -627,8 +627,12 @@ js-test: - git submodule update --init --recursive - export JS_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep ^js/ | wc -l) - if [ $JS_FILES_MODIFIED -eq 0 ]; then echo "Skipping JS deps install since no JS files modified."; else ./js/scripts/install-deps.sh;fi + - export JS_OLD_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep ^js-old/ | wc -l) + - if [ $JS_OLD_FILES_MODIFIED -eq 0 ]; then echo "Skipping JS (old) deps install since no JS files modified."; else ./js-old/scripts/install-deps.sh;fi + script: - if [ $JS_FILES_MODIFIED -eq 0 ]; then echo "Skipping JS lint since no JS files modified."; else ./js/scripts/lint.sh && ./js/scripts/test.sh && ./js/scripts/build.sh; fi + - if [ $JS_OLD_FILES_MODIFIED -eq 0 ]; then echo "Skipping JS (old) lint since no JS files modified."; else ./js-old/scripts/lint.sh && ./js-old/scripts/test.sh && ./js-old/scripts/build.sh; fi tags: - rust - rust-stable @@ -679,10 +683,17 @@ js-release: - export JS_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep ^js/ | wc -l) - echo $JS_FILES_MODIFIED - if [ $JS_FILES_MODIFIED -eq 0 ]; then echo "Skipping JS deps install since no JS files modified."; else ./js/scripts/install-deps.sh;fi + - export JS_OLD_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep ^js-old/ | wc -l) + - echo $JS_OLD_FILES_MODIFIED + - if [ $JS_OLD_FILES_MODIFIED -eq 0 ]; then echo "Skipping JS (old) deps install since no JS files modified."; else ./js-old/scripts/install-deps.sh;fi + script: - rustup default stable - echo $JS_FILES_MODIFIED - if [ $JS_FILES_MODIFIED -eq 0 ]; then echo "Skipping JS rebuild since no JS files modified."; else ./js/scripts/build.sh && ./js/scripts/release.sh; fi + - echo $JS_OLD_FILES_MODIFIED + - if [ $JS_OLD_FILES_MODIFIED -eq 0 ]; then echo "Skipping JS (old) rebuild since no JS files modified."; else ./js-old/scripts/build.sh && ./js-old/scripts/release.sh; fi + tags: - javascript push-release: diff --git a/dapps/ui/Cargo.toml b/dapps/ui/Cargo.toml index b16769bd4..8d254b177 100644 --- a/dapps/ui/Cargo.toml +++ b/dapps/ui/Cargo.toml @@ -12,8 +12,8 @@ rustc_version = "0.1" [dependencies] parity-ui-dev = { path = "../../js", optional = true } parity-ui-old-dev = { path = "../../js-old", optional = true } -parity-ui-old-precompiled = { git = "https://github.com/paritytech/js-precompiled.git", optional = true, branch = "v1" } # This is managed by the js/scripts/release.sh script on CI - keep it in a single line +parity-ui-old-precompiled = { git = "https://github.com/paritytech/js-precompiled.git", optional = true, branch = "v1" } parity-ui-precompiled = { git = "https://github.com/paritytech/js-precompiled.git", optional = true, branch = "master" } [features] diff --git a/js-old/scripts/release.sh b/js-old/scripts/release.sh index d1d9cfacb..ad381eb2c 100755 --- a/js-old/scripts/release.sh +++ b/js-old/scripts/release.sh @@ -4,7 +4,7 @@ set -e # variables UTCDATE=`date -u "+%Y%m%d-%H%M%S"` PACKAGES=( "parity" "etherscan" "shapeshift" "jsonrpc" ) -BRANCH=$CI_BUILD_REF_NAME +BRANCH="v1" GIT_JS_PRECOMPILED="https://${GITHUB_JS_PRECOMPILED}:@github.com/paritytech/js-precompiled.git" GIT_PARITY="https://${GITHUB_JS_PRECOMPILED}:@github.com/paritytech/parity.git" @@ -57,40 +57,11 @@ setup_git_user git remote set-url origin $GIT_PARITY git reset --hard origin/$BRANCH 2>$GITLOG -if [ "$BRANCH" == "master" ]; then - cd js - - echo "*** Bumping package.json patch version" - npm --no-git-tag-version version - npm version patch - - echo "*** Building packages for npmjs" - echo "$NPM_TOKEN" >> ~/.npmrc - - # build jsonrpc - echo "*** Building JSONRPC .json" - mkdir -p .npmjs/jsonrpc - npm run ci:build:jsonrpc - - for PACKAGE in ${PACKAGES[@]} - do - echo "*** Building $PACKAGE" - LIBRARY=$PACKAGE npm run ci:build:npm - DIRECTORY=.npmjs/$PACKAGE - - echo "*** Publishing $PACKAGE from $DIRECTORY" - cd $DIRECTORY - npm publish --access public || true - cd ../.. - done - - cd .. -fi - -echo "*** Updating cargo parity-ui-precompiled#$PRECOMPILED_HASH" +echo "*** Updating cargo parity-ui-old-precompiled#$PRECOMPILED_HASH" git submodule update -sed -i "/^parity-ui-precompiled/ { s/branch = \".*\"/branch = \"$BRANCH\"/g; }" dapps/ui/Cargo.toml -cargo update -p parity-ui-precompiled +# Not needed since $BRANCH is hardcoded +# sed -i "/^parity-ui-old-precompiled/ { s/branch = \".*\"/branch = \"$BRANCH\"/g; }" dapps/ui/Cargo.toml +cargo update -p parity-ui-old-precompiled # --precise "$PRECOMPILED_HASH" echo "*** Committing updated files" diff --git a/js-old/scripts/update-precompiled.sh b/js-old/scripts/update-precompiled.sh index 0b9461bf0..ebbab5046 100755 --- a/js-old/scripts/update-precompiled.sh +++ b/js-old/scripts/update-precompiled.sh @@ -5,7 +5,7 @@ set -e pushd `dirname $0` cd ../../ -cargo update -p parity-ui-precompiled +cargo update -p parity-ui-old-precompiled popd exit 0