1.1.0 • Published 3 years ago

sample01 v1.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Auto Git Versioning

link detail https://github.com/yaza-putu/release-it

Requirement

  • NodeJs + NPM

How To Install

##Install globally and run from anywhere
sudo npm install --global release-it

Configure

  • create .release-it.json on your project with template bellow
  • create or update .gitignore
*.release-it.json
export GITHUB_TOKEN="9a....."
//or
export GITLAB_TOKEN="9a....."

export token optional , you can use export manual on terminal before run release-it

Use release-it

  • export GITHUB_TOKEN="9a....." or export GITLAB_TOKEN="9a....." (use on terminal if you not create on ~/.bash_profile) Token require if release : true
  • git add .
  • git commit -m "messages"
  • release-it and follow the next intructions

Template .release-it.json For Github

{
  "git": {
      "changelog": "git log --pretty=format:\"* %s (%h)\" ${latestTag}...HEAD",
      "requireCleanWorkingDir": true,
      "requireBranch": false,
      "requireUpstream": true,
      "requireCommits": false,
      "addUntrackedFiles": false,
      "commit": true,
      "commitMessage": "Release v${version}",
      "commitArgs": [],
      "tag": true,
      "tagName": "v${version}",
      "tagAnnotation": "Release v${version}",
      "tagArgs": [],
      "push": true,
      "pushArgs": ["--follow-tags"],
      "pushRepo": "https://github.com/repository/reponame.git"
  },
  "github": {
      "release": true,
      "releaseName": "v${version}",
      "releaseNotes": null,
      "preRelease": false,
      "draft": false,
      "tokenRef": "GITHUB_TOKEN",
      "assets": null,
      "host": null,
      "timeout": 0,
      "proxy": null
  }
}

Template .release-it.json For Gitlab

{
  "git": {
      "changelog": "git log --pretty=format:\"* %s (%h)\" ${latestTag}...HEAD",
      "requireCleanWorkingDir": true,
      "requireBranch": false,
      "requireUpstream": true,
      "requireCommits": false,
      "addUntrackedFiles": false,
      "commit": true,
      "commitMessage": "Release v${version}",
      "commitArgs": [],
      "tag": true,
      "tagName": "v${version}",
      "tagAnnotation": "Release v${version}",
      "tagArgs": [],
      "push": true,
      "pushArgs": ["--follow-tags"],
      "pushRepo": "https://gitlab.com/repository/reponame.git"
  },
  "gitlab": {
    "release": true,
    "releaseName": "v${version}",
    "releaseNotes": null,
    "tokenRef": "GITLAB_TOKEN",
    "assets": null,
    "origin": null
  }
}

Informations