Skip to content

Conversation

@yetist
Copy link
Member

@yetist yetist commented Feb 8, 2019

  • Update version to 0.1.1
  • Auto release version on github when push tag
  • Notify servers to download release files from github
  • Support for writing custom commands to run builds
  • Use the make -j parameter if possible
  • Optimized output message omitted
  • Update README.md
  • Update template.yml
  • Update distro_hook
  • Dependent on github python module

EDIT:
If it is running on Travis, need to add the following lines before running docker-build:

Install:
   - sudo apt-get install -y python3-pip python3-setuptools
   - sudo pip3 install --upgrade pip
   - sudo pip install PyGithub
  - ./docker-build --name ${DISTRO} --config .travis.yml --install

So, before merge this PR to master, need to modify the existing .travis.yml, otherwise the build will be breaked.

@yetist yetist changed the title Fix ShortIO calculation error [WIP]Fix ShortIO calculation error Feb 12, 2019
@yetist yetist force-pushed the travis branch 5 times, most recently from 1c60af6 to e59f3ce Compare February 14, 2019 15:22
@yetist yetist changed the title [WIP]Fix ShortIO calculation error Auto release version on github and notify custom servers Feb 14, 2019
@yetist yetist requested a review from a team February 14, 2019 15:28
@yetist
Copy link
Member Author

yetist commented Feb 14, 2019

How to use automatic publishing?

  1. Copy template.yml to .travis.yml and confirm the following:
...
deploy:
  provider: script
  script: ./docker-build --name ${DISTRO} --verbose --config .travis.yml --release
  skip_cleanup: true
  on:
    tags: true
    condition: "${TRAVIS_TAG} =~ ^v.*$ && ${DISTRO} =~ ^fedora.*$"
...
releases:
  draft: False
  prerelease: False
  checksum: True
  base_version: 1.20.0
  file_glob: True
  files: EXAMPLE-*.tar.xz           #comment 1
  servers:                              #comment 2
    - http://pub.mate-desktop.org/releases/

comments:

  • comment 1: files, it will match the tarballs file name and need to be modified.
  • comment 2: servers, when the version is successfully released on github, the servers here will receive the post request. After the server resolves the request, it knows which files should be downloaded for public release. If the server is not ready, you can delete the servers section.
  1. Enable CI service for repo on the travis website.
    URL: https://travis-ci.org/account/repositories

  2. Create a github personal access token using the public_repo and user:email scopes.
    Personal access tokens created using the repo and user scopes are also available.
    URL: https://github.com/settings/tokens/new

  3. Setup the github personal access token value to the hidden environment variables named 'GITHUB_TOKEN' on the travis-ci website.
    reference: https://docs.travis-ci.com/user/environment-variables/#defining-variables-in-repository-settings

  4. Ok, now you can create a tag and push it to github.

Note:

  • The release notes will be generated from the NEWS file. If there is no such file, it will be generated from the previous tag to the HEAD's commit log.
  • If there is no tag on the git server, base_version will be used as the previous version for this release.
  • The POST data to the server like this:
{
  "name": "docker-build",
  "version": "0.1.63",
  "tag": "v0.1.63",
  "draft": false,
  "news": "Changes since the last release: https://github.com/yetist/docker-build/compare/v0.1.62...v0.1.63",
  "prerelease": false,
  "files": [
    {
      "name": "github_release.py",
      "size": 35314,
      "url": "https://github.com/yetist/docker-build/releases/download/v0.1.63/github_release.py"
    },
    {
      "name": "github_release.py.sha256sum",
      "size": 84,
      "url": "https://github.com/yetist/docker-build/releases/download/v0.1.63/github_release.py.sha256sum"
    },
    {
      "name": "setup.py",
      "size": 1948,
      "url": "https://github.com/yetist/docker-build/releases/download/v0.1.63/setup.py"
    },
    {
      "name": "setup.py.sha256sum",
      "size": 75,
      "url": "https://github.com/yetist/docker-build/releases/download/v0.1.63/setup.py.sha256sum"
    }
  ]
}
  • Run the following command to test locally, need to set environment variables GITHUB_TOKEN:
$ docker-build -c .travis.yml -rvv

yetist added a commit to mate-desktop/caja that referenced this pull request Feb 16, 2019
yetist added a commit to mate-desktop/marco that referenced this pull request Feb 16, 2019
yetist added a commit to mate-desktop/mate-control-center that referenced this pull request Feb 16, 2019
yetist added a commit to mate-desktop/mate-desktop that referenced this pull request Feb 16, 2019
yetist added a commit to mate-desktop/mate-notification-daemon that referenced this pull request Feb 16, 2019
yetist added a commit to mate-desktop/mate-panel that referenced this pull request Feb 16, 2019
yetist added a commit to mate-desktop/mate-session-manager that referenced this pull request Feb 16, 2019
yetist added a commit to mate-desktop/mate-settings-daemon that referenced this pull request Feb 16, 2019
raveit65 pushed a commit to mate-desktop/caja that referenced this pull request Feb 16, 2019
raveit65 pushed a commit to mate-desktop/marco that referenced this pull request Feb 16, 2019
raveit65 pushed a commit to mate-desktop/mate-control-center that referenced this pull request Feb 16, 2019
@yetist
Copy link
Member Author

yetist commented Mar 5, 2019

@mate-desktop/core-team

I think this is ready, is it time to merge into the master branch?

@yetist
Copy link
Member Author

yetist commented Mar 7, 2019

Start writing the release server, https://github.com/yetist/release-server

@raveit65

This PR can be merged into the master branch so that we can open more repos to use the clang analyzer.

@raveit65
Copy link
Member

raveit65 commented Mar 7, 2019

Ok, let the beast run.

Copy link
Member

@raveit65 raveit65 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test seems to be fine.

@raveit65 raveit65 merged commit 549898f into master Mar 7, 2019
@raveit65
Copy link
Member

raveit65 commented Mar 7, 2019

We can delete branch later, maybe we need it again.

@yetist
Copy link
Member Author

yetist commented Mar 8, 2019

No one is using this branch anymore, it's time to delete it.

@yetist yetist deleted the travis branch March 8, 2019 03:35
@yetist
Copy link
Member Author

yetist commented Jun 15, 2019

@raveit65

The release server just works.

Here is a demo release website: https://mate.zhcn.cc/
I use this repo for test: https://github.com/yetist/mate-common

@raveit65
Copy link
Member

@yetist
looks nice:)
I will open a new issue for this where we can work on it, together with @flexiondotorg

@raveit65 raveit65 mentioned this pull request Jun 16, 2019
@raveit65
Copy link
Member

Done #23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants