Skip to content
Snippets Groups Projects
Commit 120e0550 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

Release 2.0.0-alpha2

parents e19bd67a 0f8823fd
No related branches found
Tags 2.0.0-alpha2
No related merge requests found
Pipeline #35358 waiting for manual action
......@@ -10,6 +10,7 @@
*.sublime-project
*.sublime-workspace
.DS_Store
.idea
Thumbs.db
UserInterfaceState.xcuserstate
$RECYCLE.BIN/
......@@ -32,3 +33,4 @@ yarn.lock
/plugins
/www
/.local/
/out-tsc/
*
!.gitignore
......@@ -43,9 +43,9 @@ variables:
services:
- docker:dind
before_script:
# - docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
after_script:
# - docker logout ${CI_REGISTRY}
- docker logout ${CI_REGISTRY}
allow_failure: false
# ---------------------------------------------------------------
......@@ -136,24 +136,32 @@ failsafe-build:
<<: *git-setup
stage: release
script:
- if [[ "_${RELEASE_VERSION}" == "_" ]]; then echo "ERROR: Missing environment variable 'RELEASE_VERSION'" ; exit 1; fi
- if [[ "_${RELEASE_VERSION}" == "_" ]]; then exit 1; fi
- echo "--- Release in progress"
- git checkout -b release/${RELEASE_VERSION}
- echo "--- Manage app version"
- 'current=`grep -oP "version\": \"\d+.\d+.\d+(-(alpha|beta|rc)[0-9]+)?" package.json | grep -m 1 -oP "\d+.\d+.\d+(-(alpha|beta|rc)[0-9]+)?"`'
- 'currentManifestVersion=`grep -oP "version\": \"\d+.\d+.\d+(-(alpha|beta|rc)[0-9]+)?\"" src/manifest.json | grep -oP "\d+.\d+.\d+(-(alpha|beta|rc)[0-9]+)?"`'
- 'currentAndroidVersionCode=`grep -oP "versionCode [0-9]+" android/app/build.gradle | grep -oP "\d+"`'
- 'currentAndroidVersionName=`grep -oP "versionName \"\d+.\d+.\d+(-(alpha|beta|rc)[0-9]+)?\"" android/app/build.gradle | grep -oP "\d+.\d+.\d+(-(alpha|beta|rc)[0-9]+)?"`'
- 'currentManifestVersion=`grep -oP "version\": \"\d+.\d+.\d+(-(alpha|beta|rc)[0-9]+)?\"" src/manifest.json | grep -oP "\d+.\d+.\d+(-(alpha|beta|rc)[0-9]+)?"`'
- 'echo " Current version: $current"'
- 'echo " Current Manifest version: $currentManifestVersion"'
- 'echo " Current Android version code: $currentAndroidVersionCode"'
- 'echo " Current Android version name: $currentAndroidVersionName"'
- 'IFS="."'
- 'read -ra SPLITED_VERSION <<< "${RELEASE_VERSION}"'
- 'IFS="-"'
- 'read -ra SPLITED_PATCH <<< "${SPLITED_VERSION[2]}"'
- 'major2d=$(printf %02d ${SPLITED_VERSION[0]}) ; minor2d=$(printf %02d ${SPLITED_VERSION[1]}) ; patch2d=$(printf %02d ${SPLITED_PATCH[0]})'
- 'androidVersionCode=$major2d$minor2d$patch2d'
- 'sed -i "s/version\": \"$current\"/version\": \"${RELEASE_VERSION}\"/g" package.json'
- 'echo " Next version: ${RELEASE_VERSION}"'
- 'echo " Next Manifest version: ${RELEASE_VERSION}"'
- 'echo " Next Android version code: $androidVersionCode"'
- 'echo " Next Android version name: ${RELEASE_VERSION}"'
- 'sed -i "s/\"version\": \"$current\"/\"version\": \"${RELEASE_VERSION}\"/g" package.json'
- 'sed -i "s/\"version\": \"$currentManifestVersion\"/\"version\": \"${RELEASE_VERSION}\"/g" src/manifest.json'
- 'sed -i "s/versionCode $currentAndroidVersionCode\"/ versionCode $androidVersionCode\"/g" android/app/build.gradle'
- 'sed -i "s/versionName \"$currentAndroidVersionName\"/ versionName \"${RELEASE_VERSION}\"/g" android/app/build.gradle'
- 'sed -i "s/version\": \"$currentManifestVersion\"/version\": \"${RELEASE_VERSION}\"/g" src/manifest.json'
- 'sed -i "s/echo \".*\" #lastest/echo \"${RELEASE_VERSION}\" #lastest/g" install.sh'
# Copy cached dependencies and build
- ls -artl "${BUILD_CACHE_DIR}"
......@@ -167,7 +175,7 @@ failsafe-build:
- npm run build:prod
# Git process for release (ISO gitflow)
- git add .
- git commit -m "Prepare release ${RELEASE_VERSION}"
- git commit -m "Prepare release ${RELEASE_VERSION}" --no-verify
- git checkout master
- git merge --no-ff --no-edit -m "Release ${RELEASE_VERSION}" "release/${RELEASE_VERSION}"
- git tag -a "${RELEASE_VERSION}" -m "${RELEASE_VERSION}"
......
*
\ No newline at end of file
......@@ -13,8 +13,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
compileSdkVersion rootProject.ext.compileSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 200000
versionName "2.0.0-rc1"
versionCode 020000
versionName "2.0.0-alpha2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
......
......@@ -14,7 +14,7 @@ INSTALL_DIR=${1:-$(pwd)/${PROJECT_NAME}}
INSTALL_ENV=testing
latest_version() {
echo "2.0.0-alpha1" #lastest
echo "2.0.0-alpha2" #lastest
}
api_release_url() {
......
{
"name": "cesium",
"version": "2.0.0-rc1",
"version": "2.0.0-alpha2",
"description": "Manage G1 wallet",
"author": "Benoit Lavenier <benoit.lavenier@e-is.pro>",
"homepage": "https://cesium.app",
......@@ -11,7 +11,7 @@
},
"scripts": {
"ng": "ng",
"clean": "rm -rf www .angular/cache",
"clean": "rm -rf www .angular/cache out-tsc",
"start": "ng serve",
"start:dev": "ng serve --host 0.0.0.0 --disable-host-check",
"start:prod": "ng serve --configuration production",
......
<ion-header [translucent]="true">
<ion-toolbar color="primary">
<ion-buttons slot="start">
<ion-menu-button *ngIf="!canGoBack"></ion-menu-button>
<ion-back-button></ion-back-button>
</ion-buttons>
<ion-title size="large">
{{ 'BLOCKCHAIN.VIEW.TITLE' | translate: { number: height$ | push | numberFormat } }}
</ion-title>
</ion-toolbar>
<ion-progress-bar type="indeterminate" *rxIf="loading$"></ion-progress-bar>
</ion-header>
<ion-content [fullscreen]="true">
<ion-header collapse="condense">
<ion-toolbar>
<ion-title size="large">
{{ 'BLOCKCHAIN.VIEW.TITLE' | translate: { number: height$ | push | numberFormat } }}
</ion-title>
</ion-toolbar>
</ion-header>
<ng-container *rxIf="block$; let block; suspense: loading">
<ion-list [inset]="true">
<ion-item>
<ion-icon slot="start" name="time-outline"></ion-icon>
<ion-label>{{ block.timestamp | dateFromNow }} | {{ block.timestamp | dateFormat }}</ion-label>
</ion-item>
</ion-list>
<ion-list [inset]="true">
<ion-item-divider>
<ion-label translate>BLOCKCHAIN.VIEW.TECHNICAL_DIVIDER</ion-label>
</ion-item-divider>
<ion-item>
<ion-icon name="cog" slot="start"></ion-icon>
@if (mobile) {
<ion-label>
<h2 translate>BLOCKCHAIN.VIEW.HASH</h2>
<p class="ion-text-wrap">{{ block.height }}-{{ block.hash }}</p>
</ion-label>
} @else {
<ion-label>
<h2 translate>BLOCKCHAIN.VIEW.HASH</h2>
</ion-label>
<ion-note slot="end" class="ion-text-wrap">{{ block.height }}-{{ block.hash }}</ion-note>
}
</ion-item>
</ion-list>
<ion-list [inset]="true">
<ion-item-divider>
<ion-label translate>BLOCKCHAIN.VIEW.DATA_DIVIDER</ion-label>
</ion-item-divider>
<ion-item>
<ion-icon name="checkmark-circle-outline" slot="start"></ion-icon>
<ion-label translate>BLOCKCHAIN.VIEW.CALLS_COUNT</ion-label>
<ion-badge slot="end">{{ block.callsCount }}</ion-badge>
</ion-item>
<ion-item>
<ion-icon name="checkmark-circle-outline" slot="start"></ion-icon>
<ion-label translate>BLOCKCHAIN.VIEW.EVENTS_COUNT</ion-label>
<ion-badge slot="end">{{ block.eventsCount }}</ion-badge>
</ion-item>
<ion-item>
<ion-icon name="checkmark-circle-outline" slot="start"></ion-icon>
<ion-label translate>BLOCKCHAIN.VIEW.EXTRINSICS_COUNT</ion-label>
<ion-badge slot="end">{{ block.extrinsicsCount }}</ion-badge>
</ion-item>
</ion-list>
</ng-container>
</ion-content>
<ng-template #loading>
<ion-list>
<ng-template [ngTemplateOutlet]="itemSkeleton"></ng-template>
<ng-template [ngTemplateOutlet]="itemSkeleton"></ng-template>
<ng-template [ngTemplateOutlet]="itemSkeleton"></ng-template>
</ion-list>
</ng-template>
<ng-template #itemSkeleton>
<ion-item>
<ion-icon slot="start" name="none"></ion-icon>
<ion-label>
<h3><ion-skeleton-text animated style="width: 20%"></ion-skeleton-text></h3>
<p><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
</ion-label>
</ion-item>
</ng-template>
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { IonicModule } from '@ionic/angular';
import { BlockPage } from './block.page';
describe('BlockPage', () => {
let component: BlockPage;
let fixture: ComponentFixture<BlockPage>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [BlockPage],
imports: [IonicModule.forRoot()],
}).compileComponents();
fixture = TestBed.createComponent(BlockPage);
component = fixture.componentInstance;
fixture.detectChanges();
}));
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
import { AppPage, AppPageState } from '@app/shared/pages/base-page.class';
import { RxStateProperty, RxStateSelect } from '@app/shared/decorator/state.decorator';
import { Promise } from '@rx-angular/cdk/zone-less/browser';
import { IndexerService } from '@app/network/indexer.service';
import { Block } from '@app/block/block.model';
import { firstValueFrom, Observable } from 'rxjs';
import { isNotNil, isNotNilOrBlank } from '@app/shared/functions';
import { RxState } from '@rx-angular/state';
import { ActivatedRoute } from '@angular/router';
export interface BlockPageState extends AppPageState {
block: Block;
height: number;
}
@Component({
selector: 'app-block-page',
templateUrl: './block.page.html',
styleUrls: ['./block.page.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
providers: [RxState],
})
export class BlockPage extends AppPage<BlockPageState> implements OnInit {
@RxStateSelect() block$: Observable<Block>;
@RxStateSelect() height$: Observable<number>;
@RxStateProperty() block: Block;
@RxStateProperty() height: number;
constructor(
private indexService: IndexerService,
activatedRoute: ActivatedRoute
) {
super({
name: 'block',
initialState: {
height: +activatedRoute.snapshot.paramMap.get('height'),
},
});
}
ngOnInit() {
super.ngOnInit();
}
protected async ngOnLoad(): Promise<Partial<BlockPageState>> {
await this.indexService.ready();
const paramMap = this.activatedRoute.snapshot.paramMap;
const id = paramMap.get('id');
const height = +paramMap.get('height');
let block: Block;
if (isNotNilOrBlank(id)) {
block = await firstValueFrom(this.indexService.blockById(id));
} else if (isNotNil(height)) {
block = await firstValueFrom(this.indexService.blockByHeight(height));
} else {
throw new Error('Missing id or height');
}
return { block, height: block.height };
}
}
......@@ -2,7 +2,7 @@
"short_name": "Cesium",
"name": "Cesium",
"manifest_version": 2,
"version": "2.0.0-rc1",
"version": "2.0.0-alpha2",
"default_locale": "fr",
"description": "Cesium Wallet for Ğ1 libre currency",
"icons": [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment