When you develop oxidized-web, it is quite simple to run it from git. As it depends on oxidized,
oxidized will be included in bundle install
, and you just have to run bundle exec oxidized
.
You need bundler, if not installed yet. On debian-based systems, you can run sudo apt install ruby-bundler
to install it.
All steps in one to copy & pase:
git clone [email protected]:ytti/oxidized-web.git
cd oxidized-web
bundle config set --local path 'vendor/bundle'
bundle install
bundle exec oxidized
Changes to haml templates are reloaded on the fly. For changes to the ruby
scripts, you have to stop an restart bundle exec oxidized
.
You may need to make some changes in oxidized and oxidized-web. For this, git clone oxidized and oxidized-web in a common root directory, add the direct dependency to ../oxidized-web in oxidized and run oxidized from the oxidized repo:
git clone [email protected]:ytti/oxidized-web.git
git clone [email protected]:ytti/oxidized.git
cd oxidized
bundle config set --local path 'vendor/bundle'
echo "gem 'oxidized-web', path: '../oxidized-web'" >> Gemfile
bundle install
bundle exec bin/oxidized
Be careful when commiting your work in oxidized NOT to include the changes to Gemfile, as this is a local change for development. I (@robertcheramy) didn't find a better way to do this, better ideas are welcome :-)
If your changes to oxidized AND oxidzed-web are dependent from another, make sure you document this in the respectives CHANGELOG.md, so that everyone is informed at the next release.
The weblibs are beeing downloaded and maintained by npm
.
Run npm install
to download the weblibs. They will be stored under
node_modules
.
The file package-lock.json
(wich is tracked in git) ensures that every
developer gets the same versions.
Run npm outdated
to get a list of new releases:
oxidized-web$ npm outdated
Package Current Wanted Latest Location Depended by
datatables.net-bs5 2.0.7 2.0.8 2.0.8 node_modules/datatables.net-bs5 oxidized-web
Run npm update
to get the latest releases. They still are not used
oxidzed-web. Run rake weblibs
to sync node_modules
with
lib/oxidized/web/public/weblibs
.
Test, and commit the changes to the weblibs and package-lock.json. Don't forget to document your changes in CHANGELOG.md.
Run git diff 0.xx.yy..master
(where 0.xx.yy
is to be changed to the last
release) and review all the changes that have been done. Have a specific look
at changes you don't understand.
It is nicer to read in a GUI, so you can use something like
git difftool --tool=kdiff3 -d 0.xx.yy..master
to see it in kdiff3.
bundle outaded
bundle update
bundle outaded
Retest after updating!
npm outdated
Retest after updating!
Run bundle exec rubocop --auto-gen-config
,
and make sure bundle exec rake
passes after it.
If you change some code => Restart the release process at the beginning ;-)
Run bundle exec rake chmod
Run bundle exec rake
on the git repository to check the code against rubocop and rund the
defined tests in /spec
.
Run Oxidized-web from git against the latest Oxidized version bundle exec oxdized
Run Oxidized-web from git against the latest git of Oxidized (see above).
Do not integrate late PRs into master if they do not fix issues for the release. The must wait for the next release.
Oxidized-web versions are nummered like 0.major.minor
- major is incremented when releasing new features. minor is then set to 0
- minor is incremented when releasing fixes only, just after a major version.
- Checkout the master branch of oxidized-web. Make sure you are up to date with origin.
- Change the version in lib/oxidized/web/version.rb
- Change CHANGELOG.md to replace [Unreleased] with [0.xx.yy – 202Y-MM-DD]
- Run
git diff
to check your changes - Commit the changes to the local git repository with a commit message “chore(release): release version 0.xx.yy”
- Tag the commit with
git tag -a 0.xx.yy -m "Release 0.xx.yy"
- Build the gem with ‘rake build’
- Install an test the gem locally:
gem install --user-install pkg/oxidized-web-0.xx.yy.gem
~/.local/share/gem/ruby/3.1.0/bin/oxidized
- Push the commit and the tag to github:
git push
git push origin 0.xx.yy
- Make a release from the tag in github
- Thank the contributors
- Only describe major changes, and refer to CHANGELOG.md
- List new contributors (generated automatically)
Push the gem with ‘rake push’
You need an account at rubygems which is allowed to push oxidized
Add
## [Unreleased]
### Added
### Changed
### Fixed
And push to github
Great job! Treat yourself to your favorite drink, you deserve it!