From 0efd58217f078e4b8d813bd4238ee2781579c915 Mon Sep 17 00:00:00 2001 From: jekkos Date: Wed, 26 May 2021 10:43:17 +0200 Subject: [PATCH] Publish to github releases (#3110) --- .travis.yml | 32 ++++++++++++++++++++++---------- README.md | 2 +- deployment.json | 26 -------------------------- 3 files changed, 23 insertions(+), 37 deletions(-) delete mode 100644 deployment.json diff --git a/.travis.yml b/.travis.yml index 3bd10eb53..5143612b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ sudo: required +if: tag IS blank branches: except: @@ -9,8 +10,7 @@ before_install: - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose - chmod +x docker-compose - sudo mv docker-compose /usr/local/bin - - date=`date +%Y%m%d%H%M%S` && branch=${TRAVIS_BRANCH} && rev=`git rev-parse --short=6 - HEAD` && sed -i "s/\$1/\$1.$date.$branch.$rev/g" deployment.json + script: - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - docker run --rm -v $(pwd):/app jekkos/composer composer install @@ -22,15 +22,27 @@ script: - docker-compose -f docker-compose.test.yml up --abort-on-container-exit env: global: - - DOCKER_COMPOSE_VERSION=1.21.1 - - TAG=$(echo ${TRAVIS_BRANCH} | sed s/feature\\///) -after_success: - - 'docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" && docker tag "ospos:latest" "jekkos/opensourcepos:$TAG" && docker push "jekkos/opensourcepos:$TAG"' + - DOCKER_COMPOSE_VERSION=1.21.1 + - TAG=$(echo ${TRAVIS_BRANCH} | sed s/feature\\///) +after_success: + - docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" && docker tag "ospos:latest" + "jekkos/opensourcepos:$TAG" && docker push "jekkos/opensourcepos:$TAG" +before_deploy: + - date=`date +%Y%m%d%H%M%S` && branch=${TRAVIS_BRANCH} && rev=`git rev-parse --short=6 HEAD` + - TRAVIS_TAG=$(echo $branch) + - git tag -f "$branch" + - sudo mv dist/opensourcepos.zip "dist/opensourcepos.$date.$branch.$rev.zip" deploy: - file: deployment.json - provider: bintray + provider: releases + file: "dist/opensourcepos.$date.$branch.$rev.zip" + name: "$TAG" + release_notes_file: WHATS_NEW.txt + prerelease: true skip_cleanup: true - key: ${BINTRAY_API_KEY} + user: jekkos + overwrite: true + api_key: + secure: Ax25mMRDfHVf/HjRwqxYJe2oMnWC4sc2aKIiUxAOviVJJSCl4GMWhcFlUNnFsDcKIg2ofEGMVD6b9cTBuOwPDvymUDFnLNCCgDWve+vRDdWaTkTipn77Qk4c9UO9VvuzlPSKopChefPHlQ0n1rEmAMiKIXuqjUlNGqybW4FLP4E= on: - all_branches: true + all_branches: true \ No newline at end of file diff --git a/README.md b/README.md index 74b24674e..0c90d88e7 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,7 @@ If missing information is not provided within a week we will close your issue. FAQ --- -* If you are seeing the message **system folder missing**, then you have cloned the source using git and you need to run a build *first*. Check [INSTALL.md](https://github.com/opensourcepos/opensourcepos/blob/master/INSTALL.md) for instructions or download latest zip file from [bintray](https://bintray.com/jekkos/opensourcepos/opensourcepos/view/files?sort=updated&order=desc#files) instead. +* If you are seeing the message **system folder missing**, then you have cloned the source using git and you need to run a build *first*. Check [INSTALL.md](https://github.com/opensourcepos/opensourcepos/blob/master/INSTALL.md) for instructions or download latest zip file from [PLACEHOLDER](https://NEWURL) instead. * If at login time you read "The installation is not correct, check your php.ini file.", please check the error_log in public folder to understand what's wrong and make sure you read the [INSTALL.md](https://github.com/opensourcepos/opensourcepos/blob/master/INSTALL.md). To know how to enable error_log, please read the comment in [issue 1770](https://github.com/opensourcepos/opensourcepos/issues/1770#issuecomment-355177943). diff --git a/deployment.json b/deployment.json deleted file mode 100644 index bf22962c5..000000000 --- a/deployment.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "package": { - "name": "opensourcepos", - "repo": "opensourcepos", - "subject": "jekkos", - "website_url": "https://www.github.com/opensourcepos/opensourcepos", - "issue_tracker_url": "https://github.com/opensourcepos/opensourcepos/issues", - "vcs_url": "https://github.com/opensourcepos/opensourcepos.git", - "github_use_tag_release_notes": true, - "github_release_notes_file": "WHATS_NEW.txt", - "licenses": ["MIT"], - "labels": ["pointofsale"], - "public_download_numbers": true, - "public_stats": true - }, - "version": { - "name": "3.4.0-dev" - }, - "files": [ - {"includePattern": "dist(.*)\\.(zip)", "uploadPattern": "$1.$2"} - ], - "matrixParams": { - "override": 1 - }, - "publish": true -}