Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

0.0.37-2 ionic build android --release doesn't build a new release! #279

Closed
peterpeterparker opened this issue Oct 29, 2016 · 9 comments
Closed

Comments

@peterpeterparker
Copy link

peterpeterparker commented Oct 29, 2016

Hey,

Is following command still a valid command?

ionic build android --release

If no, forget my message of course.
If yes, well, this command doesn't build anymore new releases.

I was working on version 0.6.4 of my app and was going to build 0.7.0.

I did the above command and deployed it on my phone. I noticed thensome weird bugs I just fixed and then noticed that the version number hasn't moved. Ran the commands and new installation from scratch, deleted the app to install it again, nothing changed, still same.

I then ran the build command without the argument --release aka

ionic build android

and I was then able to produce the right version of my app.

But as I said, maybe it's all my fault and that command doesn't exist at all, in such a case sorry for posting that issue.

@danbucholtz
Copy link
Contributor

I don't think the --release does anything right now but I will look into it. I don't know what it's supposed to do to be totally honest.

Thanks,
Dan

@peterpeterparker
Copy link
Author

@danbucholtz I read about --release on the forum regarding boot performances, that's why I was trying to use it actually. I guess it's kind of an inheritance of using it as in Ionic1 (see https://ionicframework.com/docs/guide/publishing.html).

Personally I could leave without, was just really surprising that the thing was built, without errors of warnings, but that the result was the same previous version of my app without my fixes and enhancements.

Thx for having a look

@peterpeterparker
Copy link
Author

@danbucholtz no pressure, but did you discover something about this subject "--release"?

we had some conversations on the forum about boot time and AoT and @alfabetagama pointed out that he think that --release will generate the compilation of AoT aka when this option isn't use, AoT will not be included

https://forum.ionicframework.com/t/ionic-2-speed-up-boot-time/46372/113

For the record, even I know --release may not be a valid option, tried again this one with 0.0.39 and I could reproduce the problem I reported above

Sorry for asking, but I'm a little confuse about this issue, what does this options do or don't and when is really the AoT compilation done

@jgw96
Copy link
Contributor

jgw96 commented Nov 7, 2016

Hello! Thanks for using Ionic! So just to clear up any confusion, the use of the --release flag is not related in any way to if our build process uses AoT or not. When doing a dev build, which happens by default when you do ionic serve we do not do AoT compile, but when building to a device with ionic run and ionic build we do our full prod build, which does AoT compile, minification etc. You do not have to add any special flag such as --release to those commands to get the prod build.

@peterpeterparker
Copy link
Author

thx @jgw96 and @danbucholtz all clear now.

I think it makes sense to close that issue then, since --release isn't a thing, its side effect should also be ignored.

@ghenry22
Copy link

except that ionic build android does a dev build with app-scripts 0.48, my understanding was:

Serve / Emualate / Run are supposed to default to DEV
build is supposed to default to PROD

But with the current version unless I use the --prod suffix I always get dev builds. It would be a good idea to note in the ionic update docs that --release is no longer used and the new way is to do ionic build android --prod instead. Otherwise everyone else trying to build a binary for the app store will either submit dev mode builds by accident (like I did) or end up spending an afternoon trawling the internet to find this random closed issue (also like I did).

Hopefully this can save someone else some time.

@danbucholtz
Copy link
Contributor

danbucholtz commented Dec 20, 2016

@ghenry22,

Please install the latest ionic cli. Then use --prod --release.

npm install -g ionic@latest

sudo may or may not be required.

Thanks,
Dan

@biesbjerg
Copy link

I can see how it can be a bit confusing with the different similar sounding flags. --release is actually a Cordova flag (the ionic command proxies arguments to the cordova command) telling the platform to do a release build (in iOS you can have different build settings dependent on if it's a debug or distribution build).

@ghenry22
Copy link

I have the latest CLI installed already, behaviour is as I stated above. It's not that it's confusing so much as it's really not well documented anywhere.

Maybe some docs somewhere on how to prepare a production release with examples? Ionic 1 had a similar section in the docs maybe that just needs to be updated to make these kind of changes clear

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants