Skip to content
Snippets Groups Projects
Verified Commit 61a74c3b authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: change ci process

parent ec6230c9
No related branches found
No related tags found
No related merge requests found
Pipeline #23596 skipped
ada4113a83f16545fc633034da83fe21 edb69574a550b43e78b5a00620ffb306
<a name="v0.3.0"></a>
## [v0.3.0] - 2022-12-27
### Add Features
- flag for change data name
- new export
### Bug Fixes
- dont parse script or styles
- parse only html pages
- insert node error
<a name="v0.2.0"></a>
## v0.2.0 - 2022-12-27
### Add Features
- add a function to keep parts of a structure.
- implement cut, sync and template
### Changes
- complete documentation
- update libs
- update makefiles
- project sturcture
[v0.3.0]: https://gitlab.schukai.com/oss/bob/compare/v0.2.0...v0.3.0
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
"devenv": { "devenv": {
"locked": { "locked": {
"dir": "src/modules", "dir": "src/modules",
"lastModified": 1690413082, "lastModified": 1690570337,
"narHash": "sha256-CPR3WcnrrIiDZJiMo4RlyZB0M3576pHmtlTUnMUTugA=", "narHash": "sha256-AO9S5hi/8XINL3fDich0YOh6dgUse4/GshebUA8xCXs=",
"owner": "cachix", "owner": "cachix",
"repo": "devenv", "repo": "devenv",
"rev": "148c4a21e50428728e97f3cdf59166b6007db8a7", "rev": "7b3127f288ca732ef88db0ebc413996f4366a33f",
"type": "github" "type": "github"
}, },
"original": { "original": {
...@@ -74,11 +74,11 @@ ...@@ -74,11 +74,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1690470004, "lastModified": 1690558459,
"narHash": "sha256-l57RmPhPz9r1LGDg/0v8bYgJO8R+GGTQZtkIxE7negU=", "narHash": "sha256-5W7y1l2cLYPkpJGNlAja7XW2X2o9rjf0O1mo9nxS9jQ=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9462344318b376e157c94fa60c20a25b913b2381", "rev": "48e82fe1b1c863ee26a33ce9bd39621d2ada0a33",
"type": "github" "type": "github"
}, },
"original": { "original": {
...@@ -106,11 +106,11 @@ ...@@ -106,11 +106,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1690470004, "lastModified": 1690558459,
"narHash": "sha256-l57RmPhPz9r1LGDg/0v8bYgJO8R+GGTQZtkIxE7negU=", "narHash": "sha256-5W7y1l2cLYPkpJGNlAja7XW2X2o9rjf0O1mo9nxS9jQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9462344318b376e157c94fa60c20a25b913b2381", "rev": "48e82fe1b1c863ee26a33ce9bd39621d2ada0a33",
"type": "github" "type": "github"
}, },
"original": { "original": {
...@@ -130,11 +130,11 @@ ...@@ -130,11 +130,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1690464206, "lastModified": 1690628027,
"narHash": "sha256-38V4kmOh6ikpfGiAS+Kt2H/TA2DubSqE66veP/jmB4Q=", "narHash": "sha256-OTSbA2hM6VmxyZ/4siYPANffMBzIsKu04GLjXcv8ST0=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "9289996dcac62fd45836db7c07b87d2521eb526d", "rev": "1e2443dd3f669eb65433b2fc26a3065e05a7dc9c",
"type": "github" "type": "github"
}, },
"original": { "original": {
...@@ -171,11 +171,11 @@ ...@@ -171,11 +171,11 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1689724337, "lastModified": 1690636943,
"narHash": "sha256-cWg/RVao310yNZnvtiyxl3INOECmHtabQo5Uq2a7Qpg=", "narHash": "sha256-o+s7qlz/B4Qm1FwxHBKSehueHiN63lhLw/9ECj395yE=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "aa4874d1138ca8f573c23fdaf8978b91477ea28a", "rev": "8ec3b15207aab0070eb5f1a7a0707f6d09cb2bff",
"revCount": 28, "revCount": 30,
"type": "git", "type": "git",
"url": "https://gitlab.schukai.com/oss/utilities/version.git" "url": "https://gitlab.schukai.com/oss/utilities/version.git"
}, },
......
...@@ -3,14 +3,15 @@ ...@@ -3,14 +3,15 @@
{ {
env.LD_LIBRARY_PATH = lib.makeLibraryPath [ ]; env.LD_LIBRARY_PATH = lib.makeLibraryPath [ ];
env.APP_NAME = "bob";
# https://devenv.sh/packages/ # https://devenv.sh/packages/
packages = [ packages = [
inputs.version.defaultPackage."${builtins.currentSystem}" inputs.version.defaultPackage."${builtins.currentSystem}"
pkgs.git pkgs.git
pkgs.gcc12 pkgs.gcc12
#pkgs.glibc
pkgs.go-task pkgs.go-task
pkgs.blackbox pkgs.blackbox
pkgs.blackbox-terminal pkgs.blackbox-terminal
...@@ -26,22 +27,16 @@ ...@@ -26,22 +27,16 @@
pkgs.ranger pkgs.ranger
pkgs.meld pkgs.meld
pkgs.gnused pkgs.gnused
pkgs.coreutils-full # # https://search.nixos.org/packages?channel=23.05&show=coreutils-full&from=0&size=50&sort=relevance&type=packages&query=mkdir pkgs.coreutils-full
pkgs.gnugrep pkgs.gnugrep
pkgs.gnumake pkgs.gnumake
pkgs.util-linux pkgs.util-linux
# pkgs.logrotate
pkgs.httpie pkgs.httpie
pkgs.netcat pkgs.netcat
pkgs.memcached pkgs.memcached
pkgs.fd pkgs.fd
#pkgs.process-compose
# pkgs.glibc_multi
# pkgs.curl
]; ];
## curl geht nicht!
# https://devenv.sh/languages/ # https://devenv.sh/languages/
# languages.nix.enable = true; # languages.nix.enable = true;
...@@ -108,11 +103,21 @@ pgrep() { ...@@ -108,11 +103,21 @@ pgrep() {
export -f pgrep export -f pgrep
version() {
${inputs.version.defaultPackage."${builtins.currentSystem}"}/bin/version "$@"
}
export -f version
set -x set -x
if [ -z "'CI_JOB_TOKEN" ]; then
version=''$(git describe --tags --always --dirty) version=''$(git describe --tags --always --dirty)
buildDate=''$(date -u +"%Y-%m-%dT%H:%M:%SZ") buildDate=''$(date -u +"%Y-%m-%dT%H:%M:%SZ")
else
version=''$(version predict)
buildDate=''$(version date)
fi
${config.devenv.root}/bin/go-compile.sh \ ${config.devenv.root}/bin/go-compile.sh \
"${config.devenv.root}/source/" \ "${config.devenv.root}/source/" \
...@@ -125,8 +130,6 @@ ${config.devenv.root}/bin/go-compile.sh \ ...@@ -125,8 +130,6 @@ ${config.devenv.root}/bin/go-compile.sh \
''; '';
# This scritp is used to deploy the app to the gitlab registry # This scritp is used to deploy the app to the gitlab registry
# It is used by the gitlab-ci.yml file # It is used by the gitlab-ci.yml file
# The environment variables are set in the gitlab project settings # The environment variables are set in the gitlab project settings
...@@ -237,6 +240,7 @@ fi ...@@ -237,6 +240,7 @@ fi
git --no-pager log --decorate=short --pretty=oneline git --no-pager log --decorate=short --pretty=oneline
## the version should be the same as in the build task
if ! version auto --git --verbose if ! version auto --git --verbose
then then
echo "ERROR: Could not update version." echo "ERROR: Could not update version."
...@@ -246,31 +250,15 @@ fi ...@@ -246,31 +250,15 @@ fi
git --no-pager log --decorate=short --pretty=oneline git --no-pager log --decorate=short --pretty=oneline
gitVersion=$(version print --git) gitVersion=$(version print --git)
packageJsonFile=''${project_root}package.json
app_name=$(jq -r '.name' ''${packageJsonFile})
jq ".version = \"''${gitVersion}\"" ''${packageJsonFile} | sponge ''${packageJsonFile}
archiveFile="''${project_root}''${app_name}-''${gitVersion}.tar.gz"
tar -C ''${project_root}dist -czf ''${archiveFile} .
for files in $(ls "''${project_root}"dist/*); do
curl -v --insecure -H "JOB-TOKEN: ''${CI_JOB_TOKEN}" --upload-file \ curl -v --insecure -H "JOB-TOKEN: ''${CI_JOB_TOKEN}" --upload-file \
''${archiveFile} \ ''${archiveFile} \
https://gitlab.schukai.com/api/v4/projects/''${CI_PROJECT_ID}/packages/generic/''${app_name}/''${gitVersion}/''${app_name}.tar.gz https://gitlab.schukai.com/api/v4/projects/''${CI_PROJECT_ID}/packages/generic/''${APP_NAME}/''${gitVersion}/''${file}
done
rm ''${archiveFile}
# Check if the file has changes
if [[ -n $(git status --porcelain "''${packageJsonFile}") ]]; then
echo "Changes found in ''${packageJsonFile}. Committing..."
git add "''${packageJsonFile}"
git commit -m "Bump version to ''${gitVersion}"
git push -o ci.skip origin ''${CI_COMMIT_REF_NAME} --tags git push -o ci.skip origin ''${CI_COMMIT_REF_NAME} --tags
else
echo "No changes found in ''${CI_COMMIT_REF_NAME}. Skipping commit."
fi
echo "done" echo "done"
......
{"version":"0.6.2"}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment