-
Notifications
You must be signed in to change notification settings - Fork 28
Deployment
This guide shows how to deploy and update Piwigo NG on both Play Store and Github.
Before we jump to the release process, we need to be sure everything is setup.
Some functionalities are mandatory and must be tested before release. All tests are manual. Login, upload and navigation are critical features, and must work in any cases.
You also need to build the application in release mode, as it can throw errors that cannot be encountered in debug mode :
flutter run --release
In order for the Play Store to recognize the new version being an update of Piwigo NG, you must download the keyStore file upload-keystore.jks
. This file can be acquired from the Piwigo's development team.
Once the file is downloaded, you need to create or edit the file piwigo_flutter_app/android/key.properties
(this file must be in your .gitignore
).
# keyStore reading password
storePassword=KEY_STORE_PASSWORD
# keyStore reading password
keyPassword=KEY_STORE_PASSWORD
# key alias
keyAlias=upload
# path to keystore
storeFile=PATH_TO_KEYSTORE
The keyStore password can be acquired from the Piwigo's development team. The keyAlias doesn't need to be changed.
Don't forget to increase the app version in the pubspec.yaml
version: YOUR_VERSION_NAME+YOUR_VERSION_CODE
How to choose your version name ?
major . minor . hotfix
- major : Stands for major changes to the application, such as the 2.0.0 which redisigned the app's code ans architecture.
- minor : A version that added a noticable feature, such as the search page, tags management, ...
- hotfix : This version includes bug fixing, improvements, and small features.
Once you shoused in hich category your version is, you just need to increment the last version. If you are adding a major or a minor, remember to set lower categories to 0 :
# Old version name
Version: 1.2.8+128
# We add a "minor" update
# New version name
Version: 1.3.0+130
Now you have your version name, you need to add the version of code. It's An internal version number. This number is used only to determine whether one version is more recent than another, with higher numbers indicating more recent versions. This is not the version number shown to users.
To define your version code, just concatenate the version name. And so, our version code of 1.3.0 is 130.
Write your version in the pubspec.yaml
file:
version: 1.3.0+130
If you wish to publish this version as a pre-release, or as a part of an open-testing program, simply add -beta
after the version name like so :
version: 1.3.0-beta+130
Don't forget to push the last changes (including the version number) on master, or dedicated branch for pre-releases. The last commit will be used to tag the version on git.
In order to publish changes for Piwigo NG, you first need to build the executables for each platform.
On the Play Store, we use the AppBundle.
flutter build appbundle
On the Play Store, we use the APK.
flutter build apk
You must first log in to the Google Play Console. To do so, ask the identifiants to the Piwigo's development team. Once you have access to the console, select Piwigo NG from your apps. Then, go to Release > Production (or Testing > Open Testing for pre-releases) and click on Create New Release.
From the new release page, import the AppBundle, can be found at .../piwigo_flutter_app/build/app/outputs/bundle/release/app-release.aab
. Then, write your release notes (in both english and french). Note that Play Store release notes are very limited so just do a bullet list with only the important things of the update.
You can now send the version to roll out. Go to publishing overview and make sure the version is in review. This can take between 1 and 7 days depending on the amount of changes. Once the review has ended, go to publishing overview again and publish changes.
To summarize :
- Access Piwigo NG console
- Add AppBundle
- Write release notes
- Roll out release
- Publish changes
Begin by merging all working branches on Master. note: For pre-releases, do not use Master, but another branch designed for the beta note: Master branch must always compile.
Then, from the <> Code page, go to releases and create new release. From there, add the .apk files :
-
.../piwigo_flutter_app/build/app/outputs/flutter-apk/app-release.apk
. -
.../piwigo_flutter_app/build/app/outputs/flutter-apk/app-debug.apk
. Write the full release notes, including : - New Features, to list the features added in this version.
- Improvements, to talk about the changes and improvements made on existing features.
- Fixes, to list the bugs fixed by the update.
Optionnaly, the release can be set as pre-release if it is part of an open-testing program.
Finally, click on create release when you are ready to publish it. It is also possible to wait for the Play Store's review by clicking save draft and publish it later.
To summarize :
- Create a release tag on Master
- Add apk
- Write release notes
- Create release
Remember to write announcements on the Forums.