Rocket will execute the default steps between the before and after steps
echo "Testing Release for $VERSION"
hide_dev_dependencies
git_add
commit
tag
unhide_dev_dependencies
git_add
commit (message: “Unhide dev dependencies”)
push (remote=origin branch=master)
echo "released $VERSION"
Hide dev dependencies
When you release a package you want that who adds it as dependency downloads just the dependencies that are really needed to your package.
This is why Rocket introduces the concept of dev dependency, if you have in your package some scripts e.g. swiftformat you can add them as dev dependencies (by adding // dev after them) and they will be commented by the hide_dev_dependencies step and uncommented from the unhide_dev_dependencies.
That is also valid for the dependencies that are used just from test targets, but in that case you will have to add the test target as dev dependency too.
Rocket 🚀
Swift CLI release tool for Git repos and Swift Packages
Install Rocket
You can install Rocket with SPM
.package(url: "https://github.com/shibapm/Rocket", from: "0.1.0")swift run rocket 1.0.0where1.0.0is the version that you want to releaseSet up the release steps
With YAML
Create a file called
.rocket.ymlwith your steps insideWith PackageConfig
With PackageConfig you can put the configuration at the end of your
Package.swiftDefault steps
If there is no step definition Rocket will run the default steps:
Before/After steps
If you use the
beforeand/orafterkeyse.g.
Rocket will execute the default steps between the before and after steps
echo "Testing Release for $VERSION"hide_dev_dependencies
git_add
commit
tag
unhide_dev_dependencies
git_add
commit (message: “Unhide dev dependencies”)
push (remote=origin branch=master)
echo "released $VERSION"Hide dev dependencies
When you release a package you want that who adds it as dependency downloads just the dependencies that are really needed to your package.
This is why Rocket introduces the concept of dev dependency, if you have in your package some scripts e.g. swiftformat you can add them as dev dependencies (by adding
// devafter them) and they will be commented by thehide_dev_dependenciesstep and uncommented from theunhide_dev_dependencies.That is also valid for the dependencies that are used just from test targets, but in that case you will have to add the test target as dev dependency too.
Some examples are:
Steps
You can find the full steps list here
Variable $VERSION
You can use the variable
$VERSIONinside the steps to refer to the version you are releasingNext steps
Package.swift