Can I append "--prod --release" to my production AppFlow Package builds?

Ok, so here’s a weird one… After reading through the AppFlow Environments documentation recently, I noticed that the CI environment sets a few variables, including CI_GIT_REF_TYPE and CI_GIT_REF.

Then from one of my existing apps, I tried pushing a tag to my ionic remote and it worked fine:

image

At this point I thought I might get around this issue by adding a Bash script to my repo and changing the NPM build script command to run that instead, allowing me to run conditional commands based on the value of these environment variables.

So, I duly created a new project for testing, linked it to a new app in Ionic AppFlow, ran npm version to nump the version and set a tag, then I tried to push that tag to my ionic remote, exactly as I had done with my existing project. But this resulted in the following error:

remote: Error: only pushes are allowed.        
remote: error: hook declined to update refs/tags/v1.0.0        
To git.ionicjs.com:nortechdev/ionic-appflow-tester.git
 ! [remote rejected] v1.0.0 -> v1.0.0 (hook declined)
error: failed to push some refs to 'git@git.ionicjs.com:nortechdev/ionic-appflow-tester.git'

At first I thought this might be because there were no branches in my ionic remote yet, so I moved the HEAD of master to the previous commit, pushed that to ionic (which worked fine), moved master forward again to the point I had my tag and tried again, only to get the exact same error.

So what am I missing here, can we actually push tags to the Git repository in Ionic AppFlow or not?

1 Like