Browse Source

git auto tagging

pull/99/head 0.0.55
Ciro Santilli 1 year ago
parent
commit
79e9336eb8
3 changed files with 7 additions and 3 deletions
  1. +2
    -0
      README.adoc
  2. +3
    -2
      push-mirrors
  3. +2
    -1
      push-mirrors-bump-package-json-version

+ 2
- 0
README.adoc View File

@ -4928,6 +4928,8 @@ Update all mirrors in one go with: link:push-mirrors[]:
./push-mirrors
....
There is no need to update package versions or add git tags, all of that gets done automatically by the script!
== Backlinks to this repository
Or to Ciro's other online presences, due to China activity.


+ 3
- 2
push-mirrors View File

@ -8,7 +8,7 @@ make
# NPM package.
# Updates package.json version, which other systems read if possible.
./push-mirrors-bump-package-json-version
new_version="$(./push-mirrors-bump-package-json-version)"
npm publish
git add package.json
@ -24,8 +24,9 @@ rm -rf build dist *.egg-info
git add setup.py
# Bump package versions
git tag -m "$new_version" "$new_version"
git commit -m 'bump package version'
git push
git push --follow-tags
git push git@gitlab.com:cirosantilli/china-dictatorship.git
git push git@bitbucket.org:cirosantilli/china-dictatorship.git

+ 2
- 1
push-mirrors-bump-package-json-version View File

@ -2,6 +2,7 @@
const fs = require('fs');
const path = require('path');
const json = JSON.parse(fs.readFileSync('package.json'));
version_split = json.version.split('.');
const version_split = json.version.split('.');
json.version = `${version_split[0]}.${version_split[1]}.${parseInt(version_split[2]) + 1}`;
fs.writeFileSync('package.json', JSON.stringify(json, null, 2) + '\n');
console.log(json.version);

Loading…
Cancel
Save