Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Sprint -> Release #462

Merged
merged 2 commits into from
Sep 9, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion appshell/version.rc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ BEGIN
BEGIN
VALUE "CompanyName", "brackets.io\0"
VALUE "FileDescription", "\0"
VALUE "FileVersion", "Sprint 44\0"
VALUE "FileVersion", "Release 44\0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Damn. It should be Release 0.44, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, how could I have missed this... ;-) Let's change it and submit the change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would you like to fix it or should I do?

Copy link
Contributor

Choose a reason for hiding this comment

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

I can fix and submit it.

Copy link
Contributor

Choose a reason for hiding this comment

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

@marcelgerber I have fixed it with #465

VALUE "ProductName", APP_NAME "\0"
VALUE "ProductVersion", "\0"
VALUE "LegalCopyright", "(c) 2012 Adobe Systems, Inc.\0"
Expand Down
4 changes: 2 additions & 2 deletions installer/mac/buildInstaller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# config
releaseName="Brackets"
dmgName="${releaseName} Sprint 44"
dmgName="${releaseName} Release 44"
format="bzip2"
encryption="none"
tmpLayout="./dropDmgConfig/layouts/tempLayout"
Expand Down Expand Up @@ -40,4 +40,4 @@ dropdmg ./$tempDir --format $format --encryption $encryption $customIcon --layou

# clean up
rm -rf $tempDir
rm -rf $tmpLayout
rm -rf $tmpLayout
12 changes: 6 additions & 6 deletions installer/win/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ Normally, the installer scripts are run via Jenkins on the build machine http://
* Copy these two files to _(wix-install-dir)_\bin
9. You may need to locally edit `wix.base` in brackets-win-install-build.xml if the Wix install folder doesn't match what's hardcoded there

## Update Sprint Number with Grunt
To rev the Brackets sprint number with Grunt, both brackets-shell and brackets repositories must be updated. For the initial Grunt setup, see: https://github.com/adobe/brackets/wiki/Grunt-Setup.
## Update Release Number with Grunt
To rev the Brackets release number with Grunt, both brackets-shell and brackets repositories must be updated. For the initial Grunt setup, see: https://github.com/adobe/brackets/wiki/Grunt-Setup.

brackets > grunt set-sprint --sprint=NN
brackets-shell > grunt set-sprint --sprint=NN
brackets > grunt set-release --release=NN
brackets-shell > grunt set-release --release=NN

## To rev the Brackets sprint number manually
1. Open brackets-win-install-build.xml and change `product.sprint.number`
## To rev the Brackets release number manually
1. Open brackets-win-install-build.xml and change `product.release.number`
2. Open brackets-shell\installer\mac\buildInstaller.sh and change `releaseName`
3. Open Brackets.wxs and replace the `StartMenuShortcut` GUID property with a newly generated GUID
4. Open brackets-shell\appshell\version.rc and change `FILEVERSION` and `"FileVersion"`
Expand Down
6 changes: 3 additions & 3 deletions installer/win/brackets-win-install-build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ default="build.mul">
<!-- Product & version labeling -->
<!-- See also: product name definitions in Brackets_<locale>.wxl -->
<property name="product.shortname" value="Brackets"/>
<property name="product.sprint.number" value="44"/>
<property name="product.version.number" value="0.${product.sprint.number}"/>
<property name="product.version.name" value="Sprint ${product.sprint.number}"/>
<property name="product.release.number" value="44"/>
<property name="product.version.number" value="0.${product.release.number}"/>
<property name="product.version.name" value="Release ${product.release.number}"/>
<property name="product.fullname" value="Brackets ${product.version.name}"/>
<property name="product.manufacturer" value="brackets.io"/>
<property name="product.registry.root" value="${product.shortname}"/>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
"install": "",
"postinstall": "bash -c 'mv .appshell.gyp appshell.gyp;'"
}
}
}
8 changes: 4 additions & 4 deletions tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,10 @@ module.exports = function (grunt) {
grunt.file.write("installer/linux/debian/package-root/DEBIAN/control", content);

var done = this.async(),
sprint = semver.parse(grunt.config("pkg").version).minor;
release = semver.parse(grunt.config("pkg").version).minor;

spawn(["bash build_installer.sh"], { cwd: resolve("installer/linux"), env: getBracketsEnv() }).then(function () {
return common.rename("installer/linux/brackets.deb", "installer/linux/Brackets Sprint " + sprint + " " + common.arch() + "-bit.deb");
return common.rename("installer/linux/brackets.deb", "installer/linux/Brackets Release " + release + " " + common.arch() + "-bit.deb");
}).then(function () {
done();
}, function (err) {
Expand All @@ -251,10 +251,10 @@ module.exports = function (grunt) {
grunt.task.requires(["package"]);

var done = this.async(),
sprint = semver.parse(grunt.config("pkg").version).minor;
release = semver.parse(grunt.config("pkg").version).minor;

spawn(["bash build_archive.sh"], { cwd: resolve("installer/linux"), env: getBracketsEnv() }).then(function () {
return common.rename("installer/linux/brackets.tar.gz", "installer/linux/Brackets Sprint " + sprint + " " + common.arch() + "-bit.tar.gz");
return common.rename("installer/linux/brackets.tar.gz", "installer/linux/Brackets Release " + release + " " + common.arch() + "-bit.tar.gz");
}).then(function () {
done();
}, function (err) {
Expand Down
34 changes: 17 additions & 17 deletions tasks/set-sprint.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,49 +37,49 @@ module.exports = function (grunt) {
return newContent;
}

// task: set-sprint
grunt.registerTask("set-sprint", "Update occurrences of sprint number for all native installers and binaries", function () {
// task: set-release
grunt.registerTask("set-release", "Update occurrences of release number for all native installers and binaries", function () {
var packageJsonPath = "package.json",
packageJSON = grunt.file.readJSON(packageJsonPath),
winInstallerBuildXmlPath = "installer/win/brackets-win-install-build.xml",
buildInstallerScriptPath = "installer/mac/buildInstaller.sh",
wxsPath = "installer/win/Brackets.wxs",
versionRcPath = "appshell/version.rc",
infoPlistPath = "appshell/mac/Info.plist",
sprint = grunt.option("sprint") || 0,
release = grunt.option("release") || 0,
versionShort = packageJSON.version.substr(0, packageJSON.version.indexOf("-")),
text;

// replace sprint number in short version, e.g. N.<sprint>.N
versionShort = versionShort.replace(/([0-9]+\.)([0-9]+)(\.[0-9]+)/, "$1" + sprint + "$3");
// replace release number in short version, e.g. N.<release>.N
versionShort = versionShort.replace(/([0-9]+\.)([0-9]+)(\.[0-9]+)/, "$1" + release + "$3");

if (!sprint) {
grunt.fail.fatal("Please specify a sprint. e.g. grunt set-sprint --sprint=21");
if (!release) {
grunt.fail.fatal("Please specify a release. e.g. grunt set-release --release=21");
}

// 1. Update package.json
packageJSON.version = safeReplace(
packageJSON.version,
/([0-9]+\.)([0-9]+)([\.\-a-zA-Z0-9]*)?/,
"$1" + sprint + "$3"
"$1" + release + "$3"
);
common.writeJSON(packageJsonPath, packageJSON);

// 2. Open installer/win/brackets-win-install-build.xml and change `product.sprint.number`
// 2. Open installer/win/brackets-win-install-build.xml and change `product.release.number`
text = grunt.file.read(winInstallerBuildXmlPath);
text = safeReplace(
text,
/<property name="product\.sprint\.number" value="([0-9]+)"\/>/,
'<property name="product.sprint.number" value="' + sprint + '"/>'
/<property name="product\.release\.number" value="([0-9]+)"\/>/,
'<property name="product.release.number" value="' + release + '"/>'
);
grunt.file.write(winInstallerBuildXmlPath, text);

// 3. Open installer/mac/buildInstaller.sh and change `releaseName`
text = grunt.file.read(buildInstallerScriptPath);
text = safeReplace(
text,
/( Sprint )([0-9]+)/,
"$1" + sprint
/( Release )([0-9]+)/,
"$1" + release
);
grunt.file.write(buildInstallerScriptPath, text);

Expand All @@ -88,12 +88,12 @@ module.exports = function (grunt) {
text = safeReplace(
text,
/(FILEVERSION\s+[0-9]+,)([0-9]+)/,
"$1" + sprint
"$1" + release
);
text = safeReplace(
text,
/(Sprint )([0-9]+)/,
"$1" + sprint
/(Release )([0-9]+)/,
"$1" + release
);
grunt.file.write(versionRcPath, text);

Expand All @@ -111,4 +111,4 @@ module.exports = function (grunt) {
);
grunt.file.write(infoPlistPath, text);
});
};
};