Merge pull request 'test-woodpecker' (#1) from test-woodpecker into main
Reviewed-on: http://gitea.192.168.0.100.nip.io:3000/ihackfx/Library/pulls/1
This commit is contained in:
commit
79c14bd1aa
45
.woodpecker/.make-app.yaml
Normal file
45
.woodpecker/.make-app.yaml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
when:
|
||||||
|
- event: [push, pull_request, manual, deployment, tag, release, pull_request]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install dependencies
|
||||||
|
image: node:latest
|
||||||
|
commands:
|
||||||
|
- npm i
|
||||||
|
|
||||||
|
- name: Build web app
|
||||||
|
image: node:latest
|
||||||
|
commands:
|
||||||
|
- npm run build
|
||||||
|
|
||||||
|
- name: Ionic sync
|
||||||
|
image: node:latest
|
||||||
|
commands:
|
||||||
|
- npx cap sync
|
||||||
|
|
||||||
|
- name: Build Android app
|
||||||
|
image: mingc/android-build-box
|
||||||
|
commands:
|
||||||
|
- cd android
|
||||||
|
- bash -c "chmod +x gradlew; ./gradlew assemble"
|
||||||
|
|
||||||
|
- name: Publish app
|
||||||
|
image: ocram85/plugin-gitea-package:latest
|
||||||
|
pull: true
|
||||||
|
secrets: [ gitea_user, gitea_passwd]
|
||||||
|
settings:
|
||||||
|
user:
|
||||||
|
from_secret: gitea_user
|
||||||
|
password:
|
||||||
|
from_secret: gitea_passwd
|
||||||
|
debug: "true"
|
||||||
|
owner: "plugins"
|
||||||
|
package_name: "dummy_package"
|
||||||
|
package_version: "0.1.0"
|
||||||
|
file_source: "./android/app/build/apk/app-debug-unaligned.apk"
|
||||||
|
file_name: "app-debug-unaligned.apk"
|
||||||
|
update: "true"
|
||||||
|
when:
|
||||||
|
event: release
|
||||||
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace "io.ionic.starter"
|
namespace "ru.ihackfx.bibliotec"
|
||||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "io.ionic.starter"
|
applicationId "ru.ihackfx.bibliotec"
|
||||||
minSdkVersion rootProject.ext.minSdkVersion
|
minSdkVersion rootProject.ext.minSdkVersion
|
||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
versionCode 1
|
versionCode 1
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package io.ionic.starter;
|
package ru.ihackfx.bibliotec;
|
||||||
|
|
||||||
import com.getcapacitor.BridgeActivity;
|
import com.getcapacitor.BridgeActivity;
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">library</string>
|
<string name="app_name">Библиотекарь</string>
|
||||||
<string name="title_activity_main">library</string>
|
<string name="title_activity_main">Библиотекарь</string>
|
||||||
<string name="package_name">io.ionic.starter</string>
|
<string name="package_name">ru.ihackfx.bibliotec</string>
|
||||||
<string name="custom_url_scheme">io.ionic.starter</string>
|
<string name="custom_url_scheme">ru.ihackfx.bibliotec</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { CapacitorConfig } from '@capacitor/cli';
|
import { CapacitorConfig } from '@capacitor/cli';
|
||||||
|
|
||||||
const config: CapacitorConfig = {
|
const config: CapacitorConfig = {
|
||||||
appId: 'io.ionic.starter',
|
appId: 'ru.ihackfx.bibliotec',
|
||||||
appName: 'library',
|
appName: 'Библиотекарь',
|
||||||
webDir: 'www',
|
webDir: 'www',
|
||||||
server: {
|
server: {
|
||||||
androidScheme: 'https',
|
androidScheme: 'https',
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
"build": "ng build",
|
"build": "ng build",
|
||||||
"watch": "ng build --watch --configuration development",
|
"watch": "ng build --watch --configuration development",
|
||||||
"test": "ng test",
|
"test": "ng test",
|
||||||
"lint": "ng lint"
|
"lint": "ng lint",
|
||||||
|
"lint-fix": "ng lint --fix"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
import { TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { ApiService } from './api.service';
|
|
||||||
|
|
||||||
describe('ApiService', () => {
|
|
||||||
let service: ApiService;
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
TestBed.configureTestingModule({});
|
|
||||||
service = TestBed.inject(ApiService);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should be created', () => {
|
|
||||||
expect(service).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,34 +0,0 @@
|
|||||||
import { Injectable } from '@angular/core';
|
|
||||||
import { HttpClient } from '@angular/common/http';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
export interface docs {
|
|
||||||
cover_i: number;
|
|
||||||
has_fulltext: boolean;
|
|
||||||
edition_count: number;
|
|
||||||
title: string;
|
|
||||||
author_name: Array<string>;
|
|
||||||
first_publish_year: number;
|
|
||||||
key: string;
|
|
||||||
ia: Array<string>;
|
|
||||||
author_key: Array<string>;
|
|
||||||
public_scan_b: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface SearchResponse {
|
|
||||||
start: number;
|
|
||||||
num_found: number;
|
|
||||||
docs: Array<docs>;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Injectable({
|
|
||||||
providedIn: 'root',
|
|
||||||
deps: [HttpClient],
|
|
||||||
})
|
|
||||||
export class ApiService {
|
|
||||||
constructor(private http: HttpClient) {}
|
|
||||||
search(query: string): Observable<SearchResponse> {
|
|
||||||
return this.http.get<SearchResponse>(
|
|
||||||
`https://openlibrary.org/search.json?q=${query}&lang=ru`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -6,8 +6,8 @@ import { NewUserModalPage } from './new-user-modal.page';
|
|||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: NewUserModalPage
|
component: NewUserModalPage,
|
||||||
}
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
Loading…
Reference in New Issue
Block a user